﻿public class GlobalMembersSkills_common: GlobalMembersGame_object
{
	// ****************************************************************************
	// * Punch And Kick -- a simple 2D Fighting Game.
	// *
	// * Copyright (C) 2013 by
	// * Liu Chao
	// *
	// * This file is part of the Punch And Kick project, and may only be used,
	// * modified, and distributed under the terms of the GPLv2.
	// *
	// * (GPLv2 is abbreviation of GNU General Public License Version 2)
	// *
	// * By continuing to use, modify, or distribute this file you indicate that you
	// * have read the license and understand and accept it fully.
	// *
	// * The Punch And Kick project is distributed in the hope that it will be
	// * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 
	// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GPL v2 for
	// * more details.
	// *
	// * You should have received a copy of the GPLv2 along with this file. It is
	// * usually in the LICENSE.TXT file, If not, see <http://www.gnu.org/licenses/>.
	// * **************************************************************************

	// ****************************************************************************
	// * Punch And Kick -- 一个普通的2D格斗游戏
	// *
	// * 版权所有 (C) 2013 归属于
	// * 刘超
	// *
	// * 这个文件是 Punch And Kick 项目的一部分，并且只可以根据GPLv2许可协议来使用、
	// * 更改和发布。
	// *
	// * (GPLv2 是 GNU通用公共许可证第二版 的英文缩写)
	// *
	// * 继续使用、修改或发布本文件，表明您已经阅读并完全理解和接受这个许可协议。
	// *
	// * Punch And Kick 项目是基于技术交流目的而加以散布的，但不负任何担保责任，例
	// * 如：稳定性、可玩性、趣味性等的担保，甚至没有适销性或特定用途的隐含担保，详
	// * 情请参照GPLv2许可协议。
	// *
	// * 您应已收到附随于本文件的GPLv2许可协议的副本，它通常在LICENSE.TXT文件中，如果
	// * 没有，请查看：<http://www.gnu.org/licenses/>.
	// * **************************************************************************

	// 通用技能


	//#define XSPEED_SPINHIT
	//#define ZSPEED_SPINHIT
	//#define ZACC_SPINHIT

	//#define XSPEED_BOMBKICK
	//#define ZSPEED_BOMBKICK
	//#define ZACC_BOMBKICK

	//#define ZSPEED_BOUNCE_AlternateDefinition1
	//#define ZSPEED_BOUNCE
	//#define ZACC_BOUNCE_AlternateDefinition1
	//#define ZACC_BOUNCE

	//#define ROLL_TIMEOUT

	//#define ZSPEED_SPINHIT_2
	//#define ZACC_SPINHIT_2
	//#define XSPEED_SPINHIT_2

	////* 可擒获范围的水平宽度 
	//#define CATCH_RANGE_X_WIDTH

	//#define XSPEED_BE_PUSH
	//#define YSPEED_BE_PUSH
	//#define YACC_BE_PUSH

	//* 计算A攻击的伤害值 
	internal static int AttackDamage_AAttack(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = attacker.property.punch/10;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	//* 计算B攻击的伤害值 
	internal static int AttackDamage_BAttack(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = attacker.property.kick/10;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	//* 计算A攻击的伤害值 
	internal static int AttackDamage_MachAAttack(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = attacker.property.punch/20;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	//* 计算B攻击的伤害值 
	internal static int AttackDamage_MachBAttack(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = attacker.property.kick/20;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_SprintAAttack(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = attacker.property.punch/3;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_SprintBAttack(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = attacker.property.kick/3;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_FinalBlow(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = attacker.property.punch/4;
		damage += attacker.property.kick/4;
		damage *= 2;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_SprintJumpAAttack(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = attacker.property.punch/3;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_SprintJumpBAttack(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = attacker.property.kick/2;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_Bumped(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = 50;
		if (attacker != null)
		{
			damage += attacker.property.defense/2;
		}
		return GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		;
	}

	internal static int AttackDamage_MachStomp(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = attacker.property.kick/6;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_JumpTread(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = attacker.property.kick/6;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_JumpElbow(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = attacker.property.punch/6;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_BombKick(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = 50 + attacker.property.kick/4;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_SpinHit(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = 30 + attacker.property.kick/4;
		damage += attacker.property.punch/4;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_Throw(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = 20 + attacker.property.throw_/2;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_RideAAttack(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = 10 + attacker.property.punch/8;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_RideBAttack(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = 20 + (attacker.property.punch + attacker.property.kick)/8;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_BigElbow(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = 20 + attacker.property.punch/3;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_Guillotine(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = 20 + attacker.property.kick/3;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

	internal static int AttackDamage_JumpSpinKick(GamePlayer_ attacker, GamePlayer_ victim, int victim_state)
	{
		int damage;
		damage = 40 + attacker.property.kick/4;
		damage = GlobalMembersGame_attack.DamageReduce(victim, victim_state, damage);
		return damage;
	}

//* 在着陆完成时 

	internal static void GamePlayer_AtLandingDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_ResetAttackControl(player);
		GamePlayer_UnlockAction(player);
		GamePlayer_UnlockMotion(player);
		if(player.control.left_motion)
		{
			GamePlayer_SetLeftOriented(player);
		}
		else if(player.control.right_motion)
		{
			GamePlayer_SetRightOriented(player);
		}
		// 撤销在动作完成时的响应
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_SQUAT, null);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_SQUAT);
		GamePlayer_LockAction(player);
		GameObject_SetXSpeed(player.object_, 0);
		GameObject_SetYSpeed(player.object_, 0);
		GamePlayer_SetActionTimeOut(player, 100, GamePlayer_AtLandingSuqatDone);
	}
	internal static void CommonSkill_StartNormalJump(GamePlayer_ player)
	{
		GamePlayer_UnlockAction(player);
		// 跳跃后，重置X轴上的加速度为0
		GameObject_SetXAcc(player.object_, 0);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_JSQUAT);
		GamePlayer_LockMotion(player);
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_SQUAT, GamePlayer_AtSquatActionDone);
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_JUMP, -DefineConstantsSkills_common.ZACC_JUMP, GamePlayer_AtLandingDone);
	}
	internal static void AttackEffect_ShortHitFly(GamePlayer_ attacker, GamePlayer_ victim)
	{
		double attacker_speed;

		attacker_speed = GameObject_GetXSpeed(attacker.object_);
		// 检测该游戏角色是否有TORNADO_ATTACK技能
		if (GlobalMembersGame_skill.GamePlayer_HaveSkill(attacker, DefineConstantsSkills_common.SKILLNAME_TORNADO_ATTACK))
		{
			// 检测攻击类型是否为ATK_SPRINT_JUMP_B_ATTACK
			if(string.Compare(attacker.attack_type_name, DefineConstantsSkills_common.ATK_SPRINT_JUMP_B_ATTACK) == 0)
			{
				CommonSkill_StartSecondSpinHit(attacker);
				goto skip_speed_reduce;
			}
		}
	//     根据攻击者面向的方向，以及移动方向，判定是否需要对攻击者进行减速
	//	 * 主要是为了在多个角色互相攻击都被击飞时，不对击飞速度进行减速
	//
		if((attacker_speed > 0 && GamePlayer_IsLeftOriented(attacker) == null) || (attacker_speed < 0 && GamePlayer_IsLeftOriented(attacker)))
		{
			 GamePlayer_ReduceSpeed(attacker, 50);
		}
	skip_speed_reduce:
		// 根据攻击者面向的方向，判定受攻击者的击飞方向
		if (GamePlayer_IsLeftOriented(attacker))
		{
			AttackEffect_LeftShortHitFly(victim);
			return;
		}
		AttackEffect_RightShortHitFly(victim);
	}

	internal static void GamePlayer_AtHitDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_LYING_HIT:
			GamePlayer_SetLying(player);
			break;
		case GamePlayerState.STATE_TUMMY_HIT:
			GamePlayer_SetTummy(player);
			break;
		default:
			if(player.n_attack >= 4)
			{
				GamePlayer_SetRest(player);
			}
			else
			{
				GamePlayer_UnlockAction(player);
				GamePlayer_UnlockMotion(player);
				GamePlayer_SetReady(player);
			}
			break;
		}
	}

	//* 重置角色的受攻击次数 
	internal static void GamePlayer_ResetCountAttack(GamePlayer_ player)
	{
		player.n_attack = 0;
	}

	//* 检测目标游戏角色是否能够应用攻击效果 
	internal static LCUI_BOOL GamePlayer_CanUseAttackEffect(GamePlayer_ player)
	{
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_LYING:
		case GamePlayerState.STATE_LYING_HIT:
		case GamePlayerState.STATE_TUMMY:
		case GamePlayerState.STATE_TUMMY_HIT:
		case GamePlayerState.STATE_B_ROLL:
		case GamePlayerState.STATE_F_ROLL:
		case GamePlayerState.STATE_HIT_FLY:
		case GamePlayerState.STATE_HIT_FLY_FALL:
		case GamePlayerState.STATE_DEFENSE:
		case GamePlayerState.STATE_SOLID_DEFENSE:
		case GamePlayerState.STATE_BE_PUSH:
			break;
		default:
			return DefineConstantsSkills_common.TRUE;
		}
		return DefineConstantsSkills_common.FALSE;
	}

	//* 打断技能的效果 
	internal static void GamePlayer_BreakSkillEffect(GamePlayer_ player)
	{
		GameObject_AtZeroZSpeed(player.object_, null);
		GameObject_AtZSpeed(player.object_, 0, null);
	}

	//* 若指定游戏角色擒住了另一角色，则撤销擒住状态 
	internal static void GamePlayer_CancelStateAtCatch(GamePlayer_ player)
	{
		GamePlayer_ other_player;

		other_player = player.other;
		if (other_player == null)
		{
			return;
		}
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_CATCH:
			other_player.other = null;
			player.other = null;
			GamePlayer_SetRest(other_player);
			break;
		case GamePlayerState.STATE_CATCH_SKILL_BA:
		case GamePlayerState.STATE_CATCH_SKILL_FA:
			other_player.other = null;
			player.other = null;
			GamePlayer_UnlockAction(other_player);
			GamePlayer_ChangeState(other_player, (int)GamePlayerState.STATE_REST);
			GamePlayer_LockAction(other_player);
			AttackEffect_ShortHitFly(player, other_player);
			break;
		default:
			return;
		}
	}

	//* 若指定游戏角色被擒住，则撤销被擒住状态 
	internal static void GamePlayer_CancelStateAtBeCatch(GamePlayer_ player)
	{
		GamePlayer_ other_player;

		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_BE_CATCH:
		case GamePlayerState.STATE_BACK_BE_CATCH:
			break;
		default:
			return;
		}
		other_player = player.other;
		if (other_player == null)
		{
			return;
		}
		switch((GamePlayerState)other_player.state)
		{
		case GamePlayerState.STATE_CATCH:
			other_player.other = null;
			player.other = null;
			GamePlayer_UnlockAction(other_player);
			GamePlayer_UnlockMotion(other_player);
			GamePlayer_SetReady(other_player);
			break;
		case GamePlayerState.STATE_CATCH_SKILL_BA:
		case GamePlayerState.STATE_CATCH_SKILL_FA:
			other_player.other = null;
			player.other = null;
			GamePlayer_UnlockAction(other_player);
			GamePlayer_ChangeState(other_player,(int) GamePlayerState.STATE_REST);
			GamePlayer_LockAction(other_player);
			AttackEffect_ShortHitFly(other_player, player);
				break;
//C++ TO C# CONVERTER TODO TASK: C# does not allow fall-through from a non-empty 'case':
		default:
			break;
		}
	}

	//* 在空中受到攻击后 
	internal static void GamePlayer_AtAirHitDone(LCUI_Widget_ widget)
	{
		GamePlayer_SetFall(GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget));
	}

	//* 设置游戏角色被攻击命中 
	public static void GamePlayer_SetHit(GamePlayer_ player)
	{
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_LYING:
		case GamePlayerState.STATE_LYING_HIT:
			player.n_attack = 0;
			GamePlayer_UnlockAction(player);
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_LYING_HIT);
			GamePlayer_LockAction(player);
			GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_LYING_HIT, GamePlayer_AtHitDone);
			return;
		case GamePlayerState.STATE_TUMMY:
		case GamePlayerState.STATE_TUMMY_HIT:
			player.n_attack = 0;
			GamePlayer_UnlockAction(player);
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_TUMMY_HIT);
			GamePlayer_LockAction(player);
			GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_TUMMY_HIT, GamePlayer_AtHitDone);
			return;
		case GamePlayerState.STATE_BE_LIFT_LYING:
		case GamePlayerState.STATE_BE_LIFT_LYING_HIT:
			player.n_attack = 0;
			GamePlayer_UnlockAction(player);
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BE_LIFT_LYING_HIT);
			GamePlayer_LockAction(player);
			GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_LYING_HIT, GamePlayer_AtHitDone);
			return;
		case GamePlayerState.STATE_BE_LIFT_TUMMY:
		case GamePlayerState.STATE_BE_LIFT_TUMMY_HIT:
			player.n_attack = 0;
			GamePlayer_UnlockAction(player);
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BE_LIFT_TUMMY_HIT);
			GamePlayer_LockAction(player);
			GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_TUMMY_HIT, GamePlayer_AtHitDone);
			return;
		case GamePlayerState.STATE_B_ROLL:
		case GamePlayerState.STATE_F_ROLL:
		case GamePlayerState.STATE_HIT_FLY:
		case GamePlayerState.STATE_HIT_FLY_FALL:
		case GamePlayerState.STATE_DEFENSE:
		case GamePlayerState.STATE_SOLID_DEFENSE:
		case GamePlayerState.STATE_BE_PUSH:
			player.n_attack = 0;
			return;
		default:
			break;
		}
		GamePlayer_StopYMotion(player);
		GamePlayer_StopXMotion(player);
		GamePlayer_CancelStateAtCatch(player);
		GamePlayer_CancelStateAtBeCatch(player);
		GamePlayer_BreakSkillEffect(player);
		// 改变被举起者的状态 
		if(GamePlayer_IsInLiftState(player) != null && player.other)
		{
			if(player.state != (int)GamePlayerState.STATE_THROW)
			{
				GamePlayer_SetFall(player.other);
			}
		}
		// 如果Z轴坐标大于0，说明在空中 
		if(GameObject_GetZ(player.object_) > 0)
		{
			double z_speed;
			z_speed = GameObject_GetZSpeed(player.object_);
			GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_HIT, GamePlayer_AtAirHitDone);
			GameObject_AtLanding(player.object_, z_speed, -DefineConstantsSkills_common.ZACC_JUMP, GamePlayer_AtLandingDone);
		}
		else
		{
			GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_HIT, GamePlayer_AtHitDone);
		}
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_HIT);
		GamePlayer_LockAction(player);
		GamePlayer_SetRestTimeOut(player, 2000, GamePlayer_ResetCountAttack);
	}

	internal static void AttackEffect_BePushed(GamePlayer_ player)
	{
		GamePlayer_UnlockAction(player);
		GamePlayer_CancelStateAtBeLift(player);
		GamePlayer_CancelStateAtCatch(player);
		GamePlayer_CancelStateAtBeCatch(player);
		GamePlayer_BreakSkillEffect(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BE_PUSH);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		if (GamePlayer_IsLeftOriented(player) != null)
		{
			AttackEffect_BePushedToLeft(player);
		}
		else
		{
			AttackEffect_BePushedToRight(player);
		}
	}

	//* 普通攻击产生的效果 
	internal static void AttackEffect_Normal(GamePlayer_ attacker, GamePlayer_ victim)
	{
		if((victim.state == (int)GamePlayerState.STATE_A_ATTACK || victim.state == (int)GamePlayerState.STATE_B_ATTACK || victim.state == (int)GamePlayerState.STATE_MACH_A_ATTACK || victim.state == (int)GamePlayerState.STATE_MACH_B_ATTACK) && GamePlayer_IsLeftOriented(attacker) == GamePlayer_IsLeftOriented(victim))
		{
			victim.n_attack = 0;
			AttackEffect_BePushed(victim);
			return;
		}
		++victim.n_attack;
		GamePlayer_SetHit(victim);
	}

	//* 若指定游戏角色被举起，则撤销被举起状态 
	internal static void GamePlayer_CancelStateAtBeLift(GamePlayer_ player)
	{
		double z_speed;
		double z_acc;
		GamePlayer_ other_player;

		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_BE_LIFT_LYING:
		case GamePlayerState.STATE_BE_LIFT_LYING_HIT:
		case GamePlayerState.STATE_BE_LIFT_TUMMY:
		case GamePlayerState.STATE_BE_LIFT_TUMMY_HIT:
		case GamePlayerState.STATE_BE_LIFT_SQUAT:
		case GamePlayerState.STATE_BE_LIFT_STANCE:
		case GamePlayerState.STATE_BE_LIFT_A_ATTACK:
		case GamePlayerState.STATE_BE_LIFT_B_ATTACK:
		case GamePlayerState.STATE_BE_LIFT_MACH_A_ATTACK:
		case GamePlayerState.STATE_BE_LIFT_MACH_B_ATTACK:
		case GamePlayerState.STATE_BE_LIFT_DEFENSE:
		case GamePlayerState.STATE_BE_LIFT_SOLID_DEFENSE:
			break;
		default:
			return;
		}

		other_player = player.other;
		// 如果没有举起者的记录 
		if (other_player == null)
		{
			GamePlayer_SetFall(player);
			return;
		}
		z_speed = GameObject_GetZSpeed(other_player.object_);
		z_acc = GameObject_GetZAcc(other_player.object_);
		player.other = null;
		other_player.other = null;
		// 根据举起者当前的状态，切换至相应的普通状态 
		switch((GamePlayerState)other_player.state)
		{
		case GamePlayerState.STATE_LIFT_FALL:
			GamePlayer_UnlockAction(other_player);
			GamePlayer_ChangeState(other_player,(int) GamePlayerState.STATE_FALL);
			GamePlayer_LockAction(other_player);
			GameObject_AtLanding(other_player.object_, z_speed, z_acc, GamePlayer_AtLandingDone);
			break;
		case GamePlayerState.STATE_LIFT_JUMP:
			GamePlayer_UnlockAction(other_player);
			GamePlayer_ChangeState(other_player, (int)GamePlayerState.STATE_JUMP);
			GamePlayer_LockAction(other_player);
			GameObject_AtLanding(other_player.object_, z_speed, z_acc, GamePlayer_AtLandingDone);
			break;
		case GamePlayerState.STATE_LIFT_RUN:
			if (GamePlayer_IsLeftOriented(other_player) != null)
			{
				GamePlayer_ChangeState(other_player, (int)GamePlayerState.STATE_LEFTRUN);
			}
			else
			{
				GamePlayer_ChangeState(other_player, (int)GamePlayerState.STATE_RIGHTRUN);
			}
			break;
		case GamePlayerState.STATE_LIFT_SQUAT:
			GamePlayer_StartStand(player);
			break;
		case GamePlayerState.STATE_LIFT_STANCE:
			GamePlayer_UnlockAction(other_player);
			GamePlayer_SetReady(other_player);
			break;
		case GamePlayerState.STATE_LIFT_WALK:
			GamePlayer_UnlockAction(other_player);
			GamePlayer_ChangeState(other_player, (int)GamePlayerState.STATE_WALK);
				break;
//C++ TO C# CONVERTER TODO TASK: C# does not allow fall-through from a non-empty 'case':
		default:
			break;
		}
	}

	internal static void GamePlayer_AtHitFlyDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		// 停止移动 
		GameObject_SetYSpeed(widget, 0);
		GameObject_SetXSpeed(widget, 0);
		GameObject_SetZSpeed(widget, 0);

		if(GamePlayer_SetLying(player) == 0)
		{
			GamePlayer_SetRestTimeOut(player, DefineConstantsSkills_common.SHORT_REST_TIMEOUT, GamePlayer_StartStand);
		}
	}

	public static void GamePlayer_AtFrontalHitFlyDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		if (GamePlayer_IsLeftOriented(player) != null)
		{
			GameObject_SetXSpeed(player.object_, DefineConstantsSkills_common.XSPEED_X_HIT_FLY2);
		}
		else
		{
			GameObject_SetXSpeed(player.object_, -DefineConstantsSkills_common.XSPEED_X_HIT_FLY2);
		}
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_XF_HIT_FLY2, -DefineConstantsSkills_common.ZACC_XF_HIT_FLY2, GamePlayer_AtHitFlyDone);
	}

	internal static void GamePlayer_AtHitFlyFall(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_HIT_FLY_FALL);
		GamePlayer_LockAction(player);
		GameObject_AtZSpeed(widget, 0, null);
	}

	//* 在接近最大高度时，调整身体为平躺式 
	internal static void GamePlayer_AtHitFlyMaxHeight(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_LYING_HIT);
		GameObject_AtActionDone(widget, (int)ActionType.ACTION_LYING_HIT, null);
		GamePlayer_LockAction(player);
		GameObject_AtZSpeed(widget, -20, GamePlayer_AtHitFlyFall);
	}

	//* 在缓冲完攻击者的碰撞攻击时，解除僵直状态 
	internal static void GameObject_AtBumpBufferDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		GamePlayer_UnlockMotion(player);
	}

	//* 向左远距离击飞 
	internal static void AttackEffect_LeftLongHitFly(GamePlayer_ player)
	{
		if (GamePlayer_CanUseAttackEffect(player) == null)
		{
			double speed;
			GamePlayer_SetHit(player);
			GamePlayer_LockAction(player);
			GamePlayer_LockMotion(player);
			speed = -DefineConstantsSkills_common.XSPEED_X_HIT_FLY * 0.5;
			speed += GameObject_GetXSpeed(player.object_);
			GameObject_SetXSpeed(player.object_, speed);
			GameObject_AtXSpeedToZero(player.object_, -speed *5, GameObject_AtBumpBufferDone);
			return;
		}
		GamePlayer_CancelStateAtBeLift(player);
		GamePlayer_CancelStateAtCatch(player);
		GamePlayer_CancelStateAtBeCatch(player);
		GamePlayer_BreakSkillEffect(player);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_HIT_FLY);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		GameObject_SetXAcc(player.object_, 0);
		GameObject_SetXSpeed(player.object_, -DefineConstantsSkills_common.XSPEED_X_HIT_FLY);
		// 如果游戏角色面向左方 
		if (GamePlayer_IsLeftOriented(player) != null)
		{
			GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_XB_HIT_FLY, -DefineConstantsSkills_common.ZACC_XB_HIT_FLY, GamePlayer_AtHitFlyDone);
			return;
		}
		GameObject_AtZeroZSpeed(player.object_, null);
		GameObject_AtZSpeed(player.object_, 20, GamePlayer_AtHitFlyMaxHeight);
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_XF_HIT_FLY, -DefineConstantsSkills_common.ZACC_XF_HIT_FLY, GamePlayer_AtFrontalHitFlyDone);
	}

	//* 向右远距离击飞 
	internal static void AttackEffect_RightLongHitFly(GamePlayer_ player)
	{
		if (GamePlayer_CanUseAttackEffect(player) == null)
		{
			double speed;
			GamePlayer_SetHit(player);
			GamePlayer_LockAction(player);
			GamePlayer_LockMotion(player);
			speed = DefineConstantsSkills_common.XSPEED_X_HIT_FLY * 0.5;
			speed += GameObject_GetXSpeed(player.object_);
			GameObject_SetXSpeed(player.object_, speed);
			GameObject_AtXSpeedToZero(player.object_, -speed *5, GameObject_AtBumpBufferDone);
			return;
		}
		GamePlayer_CancelStateAtBeLift(player);
		GamePlayer_CancelStateAtCatch(player);
		GamePlayer_CancelStateAtBeCatch(player);
		GamePlayer_BreakSkillEffect(player);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_HIT_FLY);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		GameObject_SetXAcc(player.object_, 0);
		GameObject_SetXSpeed(player.object_, DefineConstantsSkills_common.XSPEED_X_HIT_FLY);
		// 如果游戏角色面向右方 
		if (GamePlayer_IsLeftOriented(player) == null)
		{
			GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_XB_HIT_FLY, -DefineConstantsSkills_common.ZACC_XB_HIT_FLY, GamePlayer_AtHitFlyDone);
			return;
		}
		GameObject_AtZeroZSpeed(player.object_, null);
		GameObject_AtZSpeed(player.object_, 20, GamePlayer_AtHitFlyMaxHeight);
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_XF_HIT_FLY, -DefineConstantsSkills_common.ZACC_XF_HIT_FLY, GamePlayer_AtFrontalHitFlyDone);
	}

	internal static int CommonSkill_StartSecondSpinHit(GamePlayer_ player)
	{
		double x_speed;
		if(player.control.left_motion)
		{
			x_speed = -DefineConstantsSkills_common.XSPEED_SPINHIT_2;
		}
		else if(player.control.right_motion)
		{
			x_speed = DefineConstantsSkills_common.XSPEED_SPINHIT_2;
		}
		else
		{
			return -1;
		}
		GameObject_SetXSpeed(player.object_, x_speed);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_SPINHIT);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_SPINHIT_2);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_SPINHIT_2, -DefineConstantsSkills_common.ZACC_SPINHIT_2, GamePlayer_AtLandingDone);
		return 0;
	}

	internal static void AttackEffect_LongHitFly(GamePlayer_ attacker, GamePlayer_ victim)
	{
		double attacker_speed;

		attacker_speed = GameObject_GetXSpeed(attacker.object_);
		// 如果当前的攻击类型是否为 自旋击 
		if(string.Compare(attacker.attack_type_name, DefineConstantsSkills_common.ATK_SPINHIT) == 0)
		{
			// 如果能够使用二段自旋击 
			if(CommonSkill_StartSecondSpinHit(attacker) == 0)
			{
				goto skip_speed_reduce;
			}
		}
	//     根据攻击者面向的方向，以及移动方向，判定是否需要对攻击者进行减速
	//	 * 主要是为了在多个角色互相攻击都被击飞时，不对击飞速度进行减速
	//	 
		if((attacker_speed > 0 && GamePlayer_IsLeftOriented(attacker) == null) || (attacker_speed < 0 && GamePlayer_IsLeftOriented(attacker) != null))
		{
			 GamePlayer_ReduceSpeed(attacker, 50);
		}
	skip_speed_reduce:
		// 根据攻击者面向的方向，判定受攻击者的击飞方向 
		if (GamePlayer_IsLeftOriented(attacker) != null)
		{
			AttackEffect_LeftLongHitFly(victim);
			return;
		}
		AttackEffect_RightLongHitFly(victim);
	}

	//* 向左短距离击飞 
	internal static void AttackEffect_LeftShortHitFly(GamePlayer_ player)
	{
		if (GamePlayer_CanUseAttackEffect(player) == null)
		{
			double speed;
			GamePlayer_SetHit(player);
			GamePlayer_LockAction(player);
			GamePlayer_LockMotion(player);
			speed = -DefineConstantsSkills_common.XSPEED_HIT_FLY * 0.5;
			speed += GameObject_GetXSpeed(player.object_);
			GameObject_SetXSpeed(player.object_, speed);
			GameObject_AtXSpeedToZero(player.object_, -speed *5, GameObject_AtBumpBufferDone);
			return;
		}
		GamePlayer_CancelStateAtBeLift(player);
		GamePlayer_CancelStateAtCatch(player);
		GamePlayer_CancelStateAtBeCatch(player);
		GamePlayer_BreakSkillEffect(player);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_HIT_FLY);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		GameObject_SetXAcc(player.object_, 0);
		GameObject_SetXSpeed(player.object_, -DefineConstantsSkills_common.XSPEED_HIT_FLY);
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_HIT_FLY, -DefineConstantsSkills_common.ZACC_HIT_FLY, GamePlayer_AtHitFlyDone);
	}

	//* 向右短距离击飞 
	internal static void AttackEffect_RightShortHitFly(GamePlayer_ player)
	{
		if (GamePlayer_CanUseAttackEffect(player) == null)
		{
			double speed;
			GamePlayer_SetHit(player);
			GamePlayer_LockAction(player);
			GamePlayer_LockMotion(player);
			speed = DefineConstantsSkills_common.XSPEED_HIT_FLY * 0.5;
			speed += GameObject_GetXSpeed(player.object_);
			GameObject_SetXSpeed(player.object_, speed);
			GameObject_AtXSpeedToZero(player.object_, -speed *5, GameObject_AtBumpBufferDone);
			return;
		}
		GamePlayer_CancelStateAtBeLift(player);
		GamePlayer_CancelStateAtCatch(player);
		GamePlayer_CancelStateAtBeCatch(player);
		GamePlayer_BreakSkillEffect(player);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_HIT_FLY);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		GameObject_SetXAcc(player.object_, 0);
		GameObject_SetXSpeed(player.object_, DefineConstantsSkills_common.XSPEED_HIT_FLY);
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_HIT_FLY, -DefineConstantsSkills_common.ZACC_HIT_FLY, GamePlayer_AtHitFlyDone);
	}

	internal static void AttackEffect_TouchHitFly(GamePlayer_ attacker, GamePlayer_ victim)
	{
		double attacker_x;
		double victim_x;

		victim_x = GameObject_GetX(victim.object_);
		if (attacker != null)
		{
			attacker_x = GameObject_GetX(attacker.object_);
			GamePlayer_ReduceSpeed(attacker, 50);
		}
		else
		{
			attacker_x = victim_x;
		}
		// 如果攻击者在受攻击者的右方 
		if(attacker_x > victim_x+5)
		{
			// 将受攻击者向左方短距离击飞 
			AttackEffect_LeftShortHitFly(victim);
			return;
		}
		else if(attacker_x < victim_x-5)
		{
			AttackEffect_RightShortHitFly(victim);
			return;
		}
		// 距离在10以内，则由受攻击者面向的方向决定击飞方向 
		if (GamePlayer_IsLeftOriented(victim) != null)
		{
			AttackEffect_RightShortHitFly(victim);
			return;
		}
		AttackEffect_LeftShortHitFly(victim);
	}

	//* 普通攻击产生的效果（若对方处于喘气状态，则击飞对方） 
	internal static void AttackEffect_Normal2(GamePlayer_ attacker, GamePlayer_ victim)
	{
		GamePlayer_SetHit(victim);
		if (GamePlayer_CanUseAttackEffect(victim) == null)
		{
			return;
		}
		// 若当前玩家处于歇息状态，则将其击飞 
		if(victim.n_attack >= 4 || victim.state == (int)GamePlayerState.STATE_REST)
		{
			victim.n_attack = 0;
			AttackEffect_ShortHitFly(attacker, victim);
		}
		else
		{
			++victim.n_attack;
		}
	}

	//* 向后翻滚超时后 
	internal static void GamePlayer_AtBackwardRollTimeOut(GamePlayer_ player)
	{
		GameObject_SetXSpeed(player.object_, 0);
		GameObject_SetYSpeed(player.object_, 0);
		GameObject_SetYAcc(player.object_, 0);
		GameObject_SetXAcc(player.object_, 0);
		if(GamePlayer_SetLying(player) == 0)
		{
			GamePlayer_SetRestTimeOut(player, DefineConstantsSkills_common.LONG_REST_TIMEOUT, GamePlayer_StartStand);
		}
	}

	//* 向前翻滚超时后 
	internal static void GamePlayer_AtForwardRollTimeOut(GamePlayer_ player)
	{
		GameObject_SetXSpeed(player.object_, 0);
		GameObject_SetYSpeed(player.object_, 0);
		GameObject_SetYAcc(player.object_, 0);
		GameObject_SetXAcc(player.object_, 0);
		if(GamePlayer_SetTummy(player) == 0)
		{
			GamePlayer_SetRestTimeOut(player, DefineConstantsSkills_common.LONG_REST_TIMEOUT, GamePlayer_StartStand);
		}
	}

	//* 开始朝左边进行前翻滚 
	internal static void GamePlayer_StartLeftForwardRoll(LCUI_Widget_ widget)
	{
		double speed;
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_SetLeftOriented(player);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_F_ROLL);
		GamePlayer_LockAction(player);
		// 一边滚动，一边减速 
		speed = GameObject_GetXSpeed(player.object_);
		GameObject_SetXAcc(player.object_, -speed *4);
		GamePlayer_SetActionTimeOut(player, DefineConstantsSkills_common.ROLL_TIMEOUT, GamePlayer_AtForwardRollTimeOut);
	}

	//* 开始朝右边进行前翻滚 
	internal static void GamePlayer_StartRightForwardRoll(LCUI_Widget_ widget)
	{
		double speed;
		GamePlayer_ player;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_SetRightOriented(player);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_F_ROLL);
		GamePlayer_LockAction(player);
		speed = GameObject_GetXSpeed(player.object_);
		GameObject_SetXAcc(player.object_, -speed *4);
		GamePlayer_SetActionTimeOut(player, DefineConstantsSkills_common.ROLL_TIMEOUT, GamePlayer_AtForwardRollTimeOut);
	}

	//* 开始朝左边进行后翻滚 
	internal static void GamePlayer_StartLeftBackwardRoll(LCUI_Widget_ widget)
	{
		double speed;
		GamePlayer_ player;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_B_ROLL);
		GamePlayer_LockAction(player);
		speed = GameObject_GetXSpeed(player.object_);
		GameObject_SetXAcc(player.object_, -speed *4);
		GamePlayer_SetActionTimeOut(player, DefineConstantsSkills_common.ROLL_TIMEOUT, GamePlayer_AtBackwardRollTimeOut);
	}

	//* 开始朝右边进行后翻滚 
	internal static void GamePlayer_StartRightBackwardRoll(LCUI_Widget_ widget)
	{
		double speed;
		GamePlayer_ player;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_B_ROLL);
		GamePlayer_LockAction(player);
		speed = GameObject_GetXSpeed(player.object_);
		GameObject_SetXAcc(player.object_, -speed *4);
		GamePlayer_SetActionTimeOut(player, DefineConstantsSkills_common.ROLL_TIMEOUT, GamePlayer_AtBackwardRollTimeOut);
	}

	//* 撞飞 
	internal static void AttackEffect_BumpToFly(GamePlayer_ attacker, GamePlayer_ victim)
	{
		double victim_speed;
		double attacker_speed;
		// 如果受攻击者对攻击者使用了擒制技能，那么此攻击效果无效 
		if(victim.state == (int)GamePlayerState.STATE_CATCH_SKILL_FA && victim.other == attacker)
		{
			 return;
		}

		attacker_speed = GameObject_GetXSpeed(attacker.object_);
		if((attacker_speed > 0 && GamePlayer_IsLeftOriented(attacker) == null) || (attacker_speed < 0 && GamePlayer_IsLeftOriented(attacker) != null))
		{
			 GamePlayer_ReduceSpeed(attacker, 50);
		}

		if (GamePlayer_CanUseAttackEffect(victim) == null)
		{
			GamePlayer_SetHit(victim);
			GamePlayer_LockAction(victim);
			GamePlayer_LockMotion(victim);
			victim_speed = GameObject_GetXSpeed(victim.object_);
			victim_speed += attacker_speed;
			GameObject_SetXSpeed(victim.object_, victim_speed);
			GameObject_AtXSpeedToZero(victim.object_, -victim_speed *5, GameObject_AtBumpBufferDone);
			return;
		}
		GamePlayer_CancelStateAtBeLift(victim);
		GamePlayer_CancelStateAtCatch(victim);
		GamePlayer_CancelStateAtBeCatch(victim);
		GamePlayer_BreakSkillEffect(victim);
		GamePlayer_UnlockAction(victim);
		GamePlayer_ChangeState(victim,(int) GamePlayerState.STATE_HIT_FLY);
		GamePlayer_LockAction(victim);
		GamePlayer_LockMotion(victim);
		GameObject_SetXAcc(victim.object_, 0);
		if (GamePlayer_IsLeftOriented(attacker) != null)
		{
			GameObject_SetXSpeed(victim.object_, -DefineConstantsSkills_common.XSPEED_S_HIT_FLY);
		}
		else
		{
			GameObject_SetXSpeed(victim.object_, DefineConstantsSkills_common.XSPEED_S_HIT_FLY);
		}
		// 如果两者朝向相同 
		if(GamePlayer_IsLeftOriented(attacker) == GamePlayer_IsLeftOriented(victim))
		{
			 // 如果攻击者朝向左方 
			if (GamePlayer_IsLeftOriented(attacker) != null)
			{
				// 落地时开始向左边进行 前翻滚 
				GameObject_AtLanding(victim.object_, DefineConstantsSkills_common.ZSPEED_S_HIT_FLY, -DefineConstantsSkills_common.ZACC_S_HIT_FLY, GamePlayer_StartLeftForwardRoll);
			}
			else
			{
				// 落地时开始向右边进行 前翻滚 
				GameObject_AtLanding(victim.object_, DefineConstantsSkills_common.ZSPEED_S_HIT_FLY, -DefineConstantsSkills_common.ZACC_S_HIT_FLY, GamePlayer_StartRightForwardRoll);
			}
			return;
		}
		// 如果攻击者朝向左方 
		if (GamePlayer_IsLeftOriented(attacker) != null)
		{
			// 落地时开始向左边进行 前翻滚 
			GameObject_AtLanding(victim.object_, DefineConstantsSkills_common.ZSPEED_S_HIT_FLY, -DefineConstantsSkills_common.ZACC_S_HIT_FLY, GamePlayer_StartLeftBackwardRoll);
		}
		else
		{
			// 落地时开始向右边进行 后翻滚 
			GameObject_AtLanding(victim.object_, DefineConstantsSkills_common.ZSPEED_S_HIT_FLY, -DefineConstantsSkills_common.ZACC_S_HIT_FLY, GamePlayer_StartRightBackwardRoll);
		}
	}

	internal static void AttackEffect_BePushedToLeft2(LCUI_Widget_ widget)
	{
		GameObject_AtLanding(widget, DefineConstantsSkills_common.YSPEED_BE_PUSH, -DefineConstantsSkills_common.YACC_BE_PUSH, GamePlayer_StartLeftForwardRoll);
	}

	internal static void AttackEffect_BePushedToLeft1(LCUI_Widget_ widget)
	{
		GameObject_AtLanding(widget, DefineConstantsSkills_common.YSPEED_BE_PUSH, -DefineConstantsSkills_common.YACC_BE_PUSH, AttackEffect_BePushedToLeft2);
	}

	internal static void AttackEffect_BePushedToLeft(GamePlayer_ player)
	{
		GameObject_SetXSpeed(player.object_, -DefineConstantsSkills_common.XSPEED_BE_PUSH);
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.YSPEED_BE_PUSH, -DefineConstantsSkills_common.YACC_BE_PUSH, AttackEffect_BePushedToLeft1);
	}

	internal static void AttackEffect_BePushedToRight2(LCUI_Widget_ widget)
	{
		GameObject_AtLanding(widget, DefineConstantsSkills_common.YSPEED_BE_PUSH, -DefineConstantsSkills_common.YACC_BE_PUSH, GamePlayer_StartRightForwardRoll);
	}

	internal static void AttackEffect_BePushedToRight1(LCUI_Widget_ widget)
	{
		GameObject_AtLanding(widget, DefineConstantsSkills_common.YSPEED_BE_PUSH, -DefineConstantsSkills_common.YACC_BE_PUSH, AttackEffect_BePushedToRight2);
	}

	internal static void AttackEffect_BePushedToRight(GamePlayer_ player)
	{
		GameObject_SetXSpeed(player.object_, DefineConstantsSkills_common.XSPEED_BE_PUSH);
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.YSPEED_BE_PUSH, -DefineConstantsSkills_common.YACC_BE_PUSH, AttackEffect_BePushedToRight1);
	}

	internal static LCUI_BOOL GamePlayerStateCanNormalAttack(GamePlayer_ player)
	{
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_READY:
		case GamePlayerState.STATE_WALK:
		case GamePlayerState.STATE_STANCE:
		case GamePlayerState.STATE_DEFENSE:
		case GamePlayerState.STATE_BE_LIFT_STANCE:
			return DefineConstantsSkills_common.TRUE;
		default:
			break;
		}
		return DefineConstantsSkills_common.FALSE;
	}

	internal static LCUI_BOOL GamePlayerStateCanJumpAttack(GamePlayer_ player)
	{
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_JUMP:
		case GamePlayerState.STATE_JSQUAT:
			return DefineConstantsSkills_common.TRUE;
		default:
			break;
		}
		return DefineConstantsSkills_common.FALSE;
	}

	internal static LCUI_BOOL GamePlayerStateCanSprintJumpAttack(GamePlayer_ player)
	{
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_SJUMP:
		case GamePlayerState.STATE_SSQUAT:
			return DefineConstantsSkills_common.TRUE;
		default:
			break;
		}
		return DefineConstantsSkills_common.FALSE;
	}

	internal static LCUI_BOOL GamePlayerStateCanThrow(GamePlayer_ player)
	{
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_LIFT_JUMP:
		case GamePlayerState.STATE_LIFT_FALL:
		case GamePlayerState.STATE_LIFT_RUN:
		case GamePlayerState.STATE_LIFT_STANCE:
		case GamePlayerState.STATE_LIFT_WALK:
			return DefineConstantsSkills_common.TRUE;
		default:
			break;
		}
		return DefineConstantsSkills_common.FALSE;
	}

	//* 处于被举起的状态下，在攻击结束时  
	internal static void GamePlayer_AtBeLiftAttackDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_NONE);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BE_LIFT_STANCE);
	}

	//* 在攻击结束时  
	internal static void GamePlayer_AtAttackDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GameObject_AtXSpeedToZero(widget, 0, null);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_NONE);
		GamePlayer_ResetAttackControl(player);
		GamePlayer_UnlockAction(player);
		GamePlayer_UnlockMotion(player);
		GamePlayer_SetReady(player);
	}

	//* 检测是否能够使用终结一击 
	internal static LCUI_BOOL CommonSkill_CanUseFinalBlow(GamePlayer_ player)
	{
		LCUI_Widget_ widget;

		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		// 如果并没有要使用A/B攻击，则不符合发动条件 
		if(player.control.a_attack == 0 && player.control.b_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (GamePlayerStateCanNormalAttack(player) == null)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		//* 检测终结一击攻击范围内是否有处于喘气状态下的游戏角色 
		widget = GameObject_GetObjectInAttackRange(player.object_, (int)ActionType.ACTION_FINAL_BLOW, DefineConstantsSkills_common.TRUE, (int)ActionType.ACTION_REST);
		// 没有就不发动 
		if (widget == null)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return DefineConstantsSkills_common.TRUE;
	}

	//* 开始发动终结一击 
	internal static void CommonSkill_StartFinalBlow(GamePlayer_ player)
	{
		//C++ TO C# CONVERTER TODO TASK: This delegate declaration (converted from the original function pointer) must be moved outside of this method:
		//public static delegate void funcDelegate(LCUI_Widget_ UnnamedParameter1);
		GlobalMembersGame_object.funcDelegate func;
		// 若当前是在被举起的状态下，站立着，则改用相应回调函数 
		if(player.state == (int)GamePlayerState.STATE_BE_LIFT_STANCE || player.state == (int)GamePlayerState.STATE_BE_LIFT_SQUAT)
		{
			func = GamePlayer_AtBeLiftAttackDone;
		}
		else
		{
			func = GamePlayer_AtAttackDone;
		}

		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_FINAL_BLOW);
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_FINAL_BLOW, func);
		GameObject_ClearAttack(player.object_);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_FINALBLOW);
		GamePlayer_StopXWalk(player);
		GamePlayer_StopYMotion(player);
		GamePlayer_LockMotion(player);
		GamePlayer_LockAction(player);
	}

	internal static void _StartNormalAttack(GamePlayer_ player, int state, int action, string attack_type_name)
	{
		//C++ TO C# CONVERTER TODO TASK: This delegate declaration (converted from the original function pointer) must be moved outside of this method:
		//public static delegate void funcDelegate(LCUI_Widget_ UnnamedParameter1);
		GlobalMembersGame_object.funcDelegate func;
		if(player.other && GamePlayer_IsInLiftState(player.other) != null)
		{
			func = GamePlayer_AtBeLiftAttackDone;
		}
		else
		{
			func = GamePlayer_AtAttackDone;
		}
		GamePlayer_ChangeState(player, state);
		GameObject_AtActionDone(player.object_, action, func);
		GamePlayer_SetAttackTypeName(player, attack_type_name);
		GamePlayer_StopXWalk(player);
		GamePlayer_StopYMotion(player);
		GamePlayer_LockMotion(player);
		GamePlayer_LockAction(player);
	}

	//* 检测是否能够使用A攻击 
	internal static LCUI_BOOL CommonSkill_CanUseAAttack(GamePlayer_ player)
	{
		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.a_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return GamePlayerStateCanNormalAttack(player);
	}

	//* 检测是否能够使用B攻击 
	internal static LCUI_BOOL CommonSkill_CanUseBAttack(GamePlayer_ player)
	{
		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.b_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return GamePlayerStateCanNormalAttack(player);
	}

	//* 检测是否能够使用跳跃A攻击 
	internal static LCUI_BOOL CommonSkill_CanUseJumpAAttack(GamePlayer_ player)
	{
		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.a_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return GamePlayerStateCanJumpAttack(player);
	}

	//* 检测是否能够使用跳跃B攻击 
	internal static LCUI_BOOL CommonSkill_CanUseJumpBAttack(GamePlayer_ player)
	{
		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.b_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return GamePlayerStateCanJumpAttack(player);
	}

	//* 开始发动A普通攻击 
	internal static void CommonSkill_StartAAttack(GamePlayer_ player)
	{
		if(player.other && GamePlayer_IsInLiftState(player.other) != null)
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BE_LIFT_A_ATTACK);
			GameObject_AtActionDone(player.object_, (int)(int)ActionType.ACTION_A_ATTACK, GamePlayer_AtBeLiftAttackDone);
		}
		else
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_A_ATTACK);
			GameObject_AtActionDone(player.object_, (int)(int)ActionType.ACTION_A_ATTACK, GamePlayer_AtAttackDone);
		}
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_A_ATTACK);
		GamePlayer_StopXWalk(player);
		GamePlayer_StopYMotion(player);
		GamePlayer_LockMotion(player);
		GamePlayer_LockAction(player);
	}

	//* 开始发动B普通攻击 
	internal static void CommonSkill_StartBAttack(GamePlayer_ player)
	{
		if(player.other && GamePlayer_IsInLiftState(player.other) != null)
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BE_LIFT_B_ATTACK);
			GameObject_AtActionDone(player.object_,(int) (int)ActionType.ACTION_B_ATTACK, GamePlayer_AtBeLiftAttackDone);
		}
		else
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_B_ATTACK);
			GameObject_AtActionDone(player.object_, (int)(int)ActionType.ACTION_B_ATTACK, GamePlayer_AtAttackDone);
		}
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_B_ATTACK);
		GamePlayer_StopXWalk(player);
		GamePlayer_StopYMotion(player);
		GamePlayer_LockMotion(player);
		GamePlayer_LockAction(player);
	}

	//* 开始发动高速A攻击 
	internal static void CommonSkill_StartMachAAttack(GamePlayer_ player)
	{
		if(player.other && GamePlayer_IsInLiftState(player.other) != null)
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BE_LIFT_MACH_A_ATTACK);
			GameObject_AtActionDone(player.object_, (int)(int)ActionType.ACTION_MACH_A_ATTACK, GamePlayer_AtBeLiftAttackDone);
		}
		else
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_MACH_A_ATTACK);
			GameObject_AtActionDone(player.object_, (int)(int)ActionType.ACTION_MACH_A_ATTACK, GamePlayer_AtAttackDone);
		}
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_MACH_A_ATTACK);
		GamePlayer_StopXWalk(player);
		GamePlayer_StopYMotion(player);
		GamePlayer_LockMotion(player);
		GamePlayer_LockAction(player);
	}

	//* 开始发动高速B攻击 
	internal static void CommonSkill_StartMachBAttack(GamePlayer_ player)
	{
		if(player.other && GamePlayer_IsInLiftState(player.other) != null)
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BE_LIFT_MACH_B_ATTACK);
			GameObject_AtActionDone(player.object_, (int)(int)ActionType.ACTION_MACH_B_ATTACK, GamePlayer_AtBeLiftAttackDone);
		}
		else
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_MACH_B_ATTACK);
			GameObject_AtActionDone(player.object_, (int)(int)ActionType.ACTION_MACH_B_ATTACK, GamePlayer_AtAttackDone);
		}
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_MACH_B_ATTACK);
		GamePlayer_StopXWalk(player);
		GamePlayer_StopYMotion(player);
		GamePlayer_LockMotion(player);
		GamePlayer_LockAction(player);
	}

	//* 检测游戏角色在当前状态下是否能够进行冲撞攻击 
	internal static LCUI_BOOL GamePlayerStateCanSprintAttack(GamePlayer_ player)
	{
		if(player.state == (int)GamePlayerState.STATE_LEFTRUN || player.state == (int)GamePlayerState.STATE_RIGHTRUN)
		{
			return DefineConstantsSkills_common.TRUE;
		}
		return DefineConstantsSkills_common.FALSE;
	}

	//* 开始发动冲撞攻击 
	internal static void _StartSprintAttack(GamePlayer_ player, int state, string attack_type_name)
	{
		double speed;
		if(player.state != (int)GamePlayerState.STATE_RIGHTRUN && player.state != (int)GamePlayerState.STATE_LEFTRUN)
		{
			return;
		}
		player.control.run = DefineConstantsSkills_common.FALSE;
		speed = GameObject_GetXSpeed(player.object_);
		GameObject_AtXSpeedToZero(player.object_, -speed *1.5, GamePlayer_AtAttackDone);
		GamePlayer_ChangeState(player, state);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		speed = GameObject_GetYSpeed(player.object_);
		GameObject_SetYAcc(player.object_, -speed *1.5);
		GamePlayer_SetAttackTypeName(player, attack_type_name);
	}

	//* 检测是否能够使用冲撞A攻击 
	internal static LCUI_BOOL CommonSkill_CanUseASprintAttack(GamePlayer_ player)
	{
		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.a_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return GamePlayerStateCanSprintAttack(player);
	}

	//* 开始发动冲撞A攻击 
	internal static void CommonSkill_StartSprintAAttack(GamePlayer_ player)
	{
		_StartSprintAttack(player, (int)GamePlayerState.STATE_AS_ATTACK, DefineConstantsSkills_common.ATK_SPRINT_A_ATTACK);
	}

	//* 检测是否能够使用冲撞B攻击 
	internal static LCUI_BOOL CommonSkill_CanUseBSprintAttack(GamePlayer_ player)
	{
		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.b_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return GamePlayerStateCanSprintAttack(player);
	}

	//* 开始发动冲撞B攻击 
	internal static void CommonSkill_StartSprintBAttack(GamePlayer_ player)
	{
		_StartSprintAttack(player, (int)GamePlayerState.STATE_BS_ATTACK, DefineConstantsSkills_common.ATK_SPRINT_B_ATTACK);
	}

	internal static LCUI_BOOL CommonSkill_CanUseSprintJumpAAttack(GamePlayer_ player)
	{
		if(player.lock_action || player.control.a_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return GamePlayerStateCanSprintJumpAttack(player);
	}

	internal static LCUI_BOOL CommonSkill_CanUseSprintJumpBAttack(GamePlayer_ player)
	{
		if(player.lock_action || player.control.b_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return GamePlayerStateCanSprintJumpAttack(player);
	}

	internal static void CommonSkill_StartSprintJumpAAttack(GamePlayer_ player)
	{
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_ASJ_ATTACK);
		GamePlayer_LockAction(player);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_SPRINT_JUMP_A_ATTACK);
	}

	internal static void CommonSkill_StartSprintJumpBAttack(GamePlayer_ player)
	{
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BSJ_ATTACK);
		GamePlayer_LockAction(player);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_SPRINT_JUMP_B_ATTACK);
	}

	//* 获取当前角色附近躺地的角色 
	internal static  GamePlayer_ GamePlayer_GetGroundPlayer(GamePlayer_ player)
	{
		RangeBox_ range = new RangeBox_();
		LCUI_Widget_ widget;

		range.x = -5;
		range.x_width = 10;
		range.y = -DefineConstantsSkills_common.GLOBAL_Y_WIDTH/2;
		range.y_width = DefineConstantsSkills_common.GLOBAL_Y_WIDTH;
		range.z = 0;
		range.z_width = 20;

		widget = GameObject_GetObjectInRange(player.object_, range, DefineConstantsSkills_common.TRUE, (int)(int)ActionType.ACTION_LYING);
		if (widget != null)
		{
			return GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
			;
		}
		widget = GameObject_GetObjectInRange(player.object_, range, DefineConstantsSkills_common.TRUE, (int)(int)ActionType.ACTION_TUMMY);
		if (widget != null)
		{
			return GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		}
		widget = GameObject_GetObjectInRange(player.object_, range, DefineConstantsSkills_common.TRUE, (int)(int)ActionType.ACTION_LYING_HIT);
		if (widget != null)
		{
			return GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		}
		widget = GameObject_GetObjectInRange(player.object_, range, DefineConstantsSkills_common.TRUE, (int)(int)ActionType.ACTION_TUMMY_HIT);
		if (widget != null)
		{
			return GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		}
		return null;
	}

	//* 检测是否可以攻击到躺地玩家 
	internal static LCUI_BOOL CommonSkill_CanAttackGround(GamePlayer_ player)
	{
		double x1;
		double x2;
		GamePlayer_ other_player;

		other_player = GamePlayer_GetGroundPlayer(player);
		if (other_player == null)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		x1 = GameObject_GetX(player.object_);
		x2 = GameObject_GetX(other_player.object_);
		// 游戏角色必须面向躺地的角色的中心位置 
		if (GamePlayer_IsLeftOriented(player) != null)
		{
			if(x1 <= x2)
			{
				return DefineConstantsSkills_common.FALSE;
			}
		}
		else
		{
			if(x1 > x2)
			{
				return DefineConstantsSkills_common.FALSE;
			}
		}
		return DefineConstantsSkills_common.TRUE;
	}

	internal static LCUI_BOOL CommonSkill_CanAAttackGround(GamePlayer_ player)
	{
		if (!GamePlayerStateCanNormalAttack(player))
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.a_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return CommonSkill_CanAttackGround(player);
	}

	internal static LCUI_BOOL CommonSkill_CanBAttackGround(GamePlayer_ player)
	{
		if (!GamePlayerStateCanNormalAttack(player))
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.b_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return CommonSkill_CanAttackGround(player);
	}

	//* 检测当前角色是否能够举起另一个角色 
	public static LCUI_BOOL GamePlayer_CanLiftPlayer(GamePlayer_ player, GamePlayer_ other_player)
	{
		double x1;
		double x2;
		double z1;
		double z2;
		x1 = GameObject_GetX(player.object_);
		x2 = GameObject_GetX(other_player.object_);
		// 如果不在中间位置附近 
		if(x1 <= x2-15 || x1 >= x2+15)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		z1 = GameObject_GetZ(player.object_);
		z2 = GameObject_GetZ(other_player.object_);
		// 两者高度差距不能太大 
		if(z1 <= z2-15 || z1 >= z2+15)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		// 如果有其它游戏角色 
		if(other_player.other)
		{
	//         如果其它游戏角色已经骑在该游戏角色身上，
	//		 * 或者举起了该游戏角色，则不能再次被其它游
	//		 * 戏角色举起或骑乘 
			switch((GamePlayerState)other_player.other.state)
			{
			case GamePlayerState.STATE_RIDE:
			case GamePlayerState.STATE_RIDE_ATTACK:
			case GamePlayerState.STATE_LIFT_SQUAT:
			case GamePlayerState.STATE_RIDE_JUMP:
			case GamePlayerState.STATE_LIFT_FALL:
			case GamePlayerState.STATE_LIFT_WALK:
			case GamePlayerState.STATE_LIFT_STANCE:
			case GamePlayerState.STATE_LIFT_RUN:
				return DefineConstantsSkills_common.FALSE;
			default:
				break;
			}
		}
		return DefineConstantsSkills_common.TRUE;
	}

	//* 检测是否能够举起躺地玩家 
	internal static LCUI_BOOL CommonSkill_CanLift(GamePlayer_ player)
	{
		GamePlayer_ other_player;
		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (!GamePlayerStateCanNormalAttack(player) )
		{
			return DefineConstantsSkills_common.FALSE;
		}
		other_player = GamePlayer_GetGroundPlayer(player);
		if (other_player == null)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (!GamePlayer_CanLiftPlayer(player, other_player) )
		{
			return DefineConstantsSkills_common.FALSE;
		}
		// 记录对方，以便接着举起 
		player.other = other_player;
		return DefineConstantsSkills_common.TRUE;
	}

	internal static LCUI_BOOL CommonSkill_CanALift(GamePlayer_ player)
	{
		if (!player.control.a_attack )
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return CommonSkill_CanLift(player);
	}

	internal static LCUI_BOOL CommonSkill_CanBLift(GamePlayer_ player)
	{
		if (!player.control.b_attack )
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return CommonSkill_CanLift(player);
	}

	//* 被举着，站立 
	internal static void GamePlayer_SetBeLiftStance(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		if(player.state != (int)GamePlayerState.STATE_BE_LIFT_SQUAT)
		{
			return;
		}
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BE_LIFT_STANCE);
	}

	//* 被举着，准备站起 
	//internal static void GamePlayer_BeLiftStartStand(GamePlayer_ player)
	//{
	//	//if (player.state != (int)GamePlayerState.STATE_LYING) return;
	//	GamePlayer_UnlockAction(player);
	//	GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BE_LIFT_SQUAT);
	//	GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_SQUAT, GamePlayer_SetBeLiftStance);
	//	GamePlayer_LockAction(player);
	//}

	//* 在跳跃结束时 
	internal static void GamePlayer_AtJumpDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		GamePlayer_UnlockMotion(player);
		GamePlayer_SetReady(player);
	}

	internal static void GamePlayer_AtLandingSuqatDone(GamePlayer_ player)
	{
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_JUMP_DONE);
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_SQUAT, GamePlayer_AtJumpDone);
		GamePlayer_LockAction(player);
	}

	//* 设置游戏角色为下落状态 
	public static void GamePlayer_SetFall(GamePlayer_ player)
	{
		double z_speed;
		GamePlayer_LockMotion(player);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_FALL);
		GamePlayer_LockAction(player);
		GamePlayer_BreakRest(player);
		GamePlayer_ResetControl(player);
		z_speed = GameObject_GetZSpeed(player.object_);
		GameObject_AtLanding(player.object_, z_speed, -DefineConstantsSkills_common.ZACC_JUMP, GamePlayer_AtLandingDone);
	}

	//* 在被举起的状态下，更新自身的位置 
	internal static void GamePlayer_UpdateLiftPosition(LCUI_Widget_ widget)
	{
		double x;
		double y;
		double z;
		GamePlayer_ player;
		GamePlayer_ other_player;
		LCUI_Widget_ other;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		other_player = player.other;
		// 如果没有举起者，或自己不是被举起者 
		if(!player.other)
		{
			GameObject_AtMove(widget, null);
			return;
		}
		else if(!player.other.other)
		{
			// 如果举起者并不处于举起状态 
			if (!GamePlayer_IsInLiftState(player))
			{
				// 如果举起者不是要要投掷自己 
				if(player.state != (int)GamePlayerState.STATE_THROW)
				{
					GamePlayer_SetFall(other_player);
				}
			}
			GameObject_AtMove(widget, null);
			return;
		}
		if (!GamePlayer_IsInLiftState(player) )
		{
			if(player.state != (int)GamePlayerState.STATE_THROW)
			{
				GamePlayer_SetFall(other_player);
			}
			GameObject_AtMove(widget, null);
			return;
		}
		other = player.other.object_;
		x = GameObject_GetX(widget);
		y = GameObject_GetY(widget);
		z = GameObject_GetZ(widget);
		// 获取当前帧的顶点相对于底线的距离 
		z += GameObject_GetCurrentFrameTop(widget);
		GameObject_SetZ(other, z);
		GameObject_SetX(other, x);
		GameObject_SetY(other, y);
	}

	internal static void GamePlayer_AtLiftDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		GamePlayer_UnlockMotion(player);
		if(!player.other)
		{
			GamePlayer_SetReady(player);
			return;
		}
		GameObject_SetZ(player.other.object_, DefineConstantsSkills_common.LIFT_HEIGHT);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_LIFT_STANCE);
		// 在举起者的位置变化时更新被举起者的位置 
		GameObject_AtMove(widget, GamePlayer_UpdateLiftPosition);
	}

	//* 开始举起另一个角色 
	internal static void CommonSkill_StartLift(GamePlayer_ player)
	{
		double x;
		double y;
		int z_index;
		GamePlayer_ other_player;

		if(!player.other)
		{
			return;
		}
		other_player = player.other;
		// 对方不处于躺地状态则退出 
		if(other_player.state != (int)GamePlayerState.STATE_LYING && other_player.state != (int)GamePlayerState.STATE_LYING_HIT && other_player.state != (int)GamePlayerState.STATE_TUMMY && other_player.state != (int)GamePlayerState.STATE_TUMMY_HIT)
		{
			player.other = null;
			return;
		}

		// 被举起的角色，需要记录举起他的角色 
		other_player.other = player;
		GamePlayer_BreakRest(other_player);
		GamePlayer_SetRestTimeOut(other_player, DefineConstantsSkills_common.BE_LIFT_REST_TIMEOUT, GamePlayer_BeLiftStartStand);
		GamePlayer_ResetControl(player);
		GamePlayer_ResetControl(other_player);
		z_index = Widget_GetZIndex(player.object_);
		Widget_SetZIndex(other_player.object_, z_index+1);

		GamePlayer_UnlockAction(other_player);
		if(other_player.state == (int)GamePlayerState.STATE_LYING || other_player.state == (int)GamePlayerState.STATE_LYING_HIT)
		{
			GamePlayer_ChangeState(other_player,(int) GamePlayerState.STATE_BE_LIFT_LYING);
		}
		else
		{
			GamePlayer_ChangeState(other_player, (int)GamePlayerState.STATE_BE_LIFT_TUMMY);
		}
		GamePlayer_LockAction(other_player);
		GamePlayer_LockMotion(other_player);
		// 举起前，先停止移动 
		GamePlayer_StopXMotion(player);
		GamePlayer_StopYMotion(player);
		GamePlayer_UnlockAction(player);
		// 改为下蹲状态 
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_LIFT_SQUAT);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_SQUAT, GamePlayer_AtLiftDone);
		// 改变躺地角色的坐标 
		x = GameObject_GetX(player.object_);
		y = GameObject_GetY(player.object_);
		GameObject_SetX(other_player.object_, x);
		GameObject_SetY(other_player.object_, y);
		GameObject_SetZ(other_player.object_, 20);
	}

	internal static void GamePlayer_AtGroundAttackDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_SQUAT);
		GamePlayer_LockAction(player);
		GameObject_SetXSpeed(player.object_, 0);
		GameObject_SetYSpeed(player.object_, 0);
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_SQUAT, GamePlayer_AtAttackDone);
	}

	internal static void CommonSkill_JumpTreadStep2(LCUI_Widget_ widget)
	{
		GamePlayer_ player;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_JUMP_STOMP);
		GamePlayer_LockAction(player);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_JUMP_TREAD);
		GameObject_AtZeroZSpeed(widget, null);
		GameObject_ClearAttack(player.object_);
	}

	internal static void CommonSkill_JumpTreadStep1(LCUI_Widget_ widget)
	{
		double z_speed;
		double z_acc;
		GamePlayer_ player;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		z_acc = -DefineConstantsSkills_common.ZACC_JUMP;
		z_speed = DefineConstantsSkills_common.ZSPEED_JUMP;
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_JUMP);
		GamePlayer_LockAction(player);
		GameObject_AtLanding(widget, z_speed, z_acc, GamePlayer_AtGroundAttackDone);
		GameObject_AtZeroZSpeed(widget, CommonSkill_JumpTreadStep2);
	}

	//* 进行跳跃+踩 
	internal static void CommonSkill_StartJumpTread(GamePlayer_ player)
	{
		GamePlayer_UnlockAction(player);
		GameObject_SetXAcc(player.object_, 0);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_SQUAT);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		GameObject_SetXSpeed(player.object_, 0);
		GameObject_SetYSpeed(player.object_, 0);
		GameObject_SetZSpeed(player.object_, 0);
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_SQUAT, CommonSkill_JumpTreadStep1);
	}

	internal static void CommonSkill_JumpElbowStep2(LCUI_Widget_ widget)
	{
		GamePlayer_ player;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_JUMP_ELBOW);
		GamePlayer_LockAction(player);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_JUMP_ELBOW);
		GameObject_AtZeroZSpeed(widget, null);
		GameObject_ClearAttack(player.object_);
	}

	internal static void CommonSkill_JumpElbowStep1(LCUI_Widget_ widget)
	{
		double z_speed;
		double z_acc;
		GamePlayer_ player;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		z_acc = -DefineConstantsSkills_common.ZACC_JUMP;
		z_speed = DefineConstantsSkills_common.ZSPEED_JUMP;
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_JUMP);
		GamePlayer_LockAction(player);
		GameObject_AtLanding(widget, z_speed, z_acc, GamePlayer_AtGroundAttackDone);
		GameObject_AtZeroZSpeed(widget, CommonSkill_JumpElbowStep2);
	}

	//* 进行跳跃+肘击 
	public static void CommonSkill_StartJumpElbow(GamePlayer_ player)
	{
		GamePlayer_UnlockAction(player);
		GameObject_SetXAcc(player.object_, 0);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_SQUAT);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		GameObject_SetXSpeed(player.object_, 0);
		GameObject_SetYSpeed(player.object_, 0);
		GameObject_SetZSpeed(player.object_, 0);
		GameObject_ClearAttack(player.object_);
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_SQUAT, CommonSkill_JumpElbowStep1);
	}

	internal static void GamePlayer_StopMachStomp(GamePlayer_ player)
	{
		GamePlayer_AtAttackDone(player.object_);
	}

	//* 高速踩踏 
	internal static void CommonSkill_StartMachStomp(GamePlayer_ player)
	{
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_MACH_STOMP);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_MACH_STOMP);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		GameObject_SetXSpeed(player.object_, 0);
		GameObject_SetYSpeed(player.object_, 0);
		GamePlayer_SetActionTimeOut(player, 1250, GamePlayer_StopMachStomp);
	}

	//* 开始发动跳跃A攻击 
	internal static void CommonSkill_StartJumpAAttack(GamePlayer_ player)
	{
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_AJ_ATTACK);
		GamePlayer_LockAction(player);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_JUMP_A_ATTACK);
	}

	//* 开始发动跳跃高速A攻击 
	internal static void CommonSkill_StartJumpMachAAttack(GamePlayer_ player)
	{
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_MAJ_ATTACK);
		GamePlayer_LockAction(player);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_JUMP_A_ATTACK);
	}

	//* 开始发动跳跃B攻击 
	internal static void CommonSkill_StartJumpBAttack(GamePlayer_ player)
	{
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BJ_ATTACK);
		GamePlayer_LockAction(player);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_JUMP_B_ATTACK);
	}

	//* 开始发动跳跃高速B攻击 
	internal static void CommonSkill_StartJumpMachBAttack(GamePlayer_ player)
	{
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_MBJ_ATTACK);
		GamePlayer_LockAction(player);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_JUMP_B_ATTACK);
	}

	internal static LCUI_BOOL CommonSkill_CanUseBombKick(GamePlayer_ player)
	{
		if(player.state != (int)GamePlayerState.STATE_JUMP_DONE)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.b_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return DefineConstantsSkills_common.TRUE;
	}

	//* 开始发动 爆裂腿技能 
	internal static void CommonSkill_StartBombKick(GamePlayer_ player)
	{
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BOMBKICK);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_BOMBKICK);
		GameObject_ClearAttack(player.object_);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		if(player.control.left_motion)
		{
			GameObject_SetXSpeed(player.object_, -DefineConstantsSkills_common.XSPEED_BOMBKICK);
			GamePlayer_SetLeftOriented(player);
		}
		else if(player.control.right_motion)
		{
			GameObject_SetXSpeed(player.object_, DefineConstantsSkills_common.XSPEED_BOMBKICK);
			GamePlayer_SetRightOriented(player);
		}
		else if (GamePlayer_IsLeftOriented(player) != null)
		{
			GameObject_SetXSpeed(player.object_, -DefineConstantsSkills_common.XSPEED_BOMBKICK);
		}
		else
		{
			GameObject_SetXSpeed(player.object_, DefineConstantsSkills_common.XSPEED_BOMBKICK);
		}
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_BOMBKICK, -DefineConstantsSkills_common.ZACC_BOMBKICK, GamePlayer_AtLandingDone);
	}

	internal static LCUI_BOOL CommonSkill_CanUseSpinHit(GamePlayer_ player)
	{
		if(player.state != (int)GamePlayerState.STATE_JUMP_DONE)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.a_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return DefineConstantsSkills_common.TRUE;
	}


	//* 开始发动 自旋击（翻转击） 技能 
	internal static void CommonSkill_StartSpinHit(GamePlayer_ player)
	{
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_SPINHIT);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_SPINHIT);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		if(player.control.left_motion)
		{
			GameObject_SetXSpeed(player.object_, -DefineConstantsSkills_common.XSPEED_SPINHIT);
			GamePlayer_SetLeftOriented(player);
		}
		else if(player.control.right_motion)
		{
			GameObject_SetXSpeed(player.object_, DefineConstantsSkills_common.XSPEED_SPINHIT);
			GamePlayer_SetRightOriented(player);
		}
		else if (GamePlayer_IsLeftOriented(player) != null)
		{
			GameObject_SetXSpeed(player.object_, -DefineConstantsSkills_common.XSPEED_SPINHIT);
		}
		else
		{
			GameObject_SetXSpeed(player.object_, DefineConstantsSkills_common.XSPEED_SPINHIT);
		}
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_SPINHIT, -DefineConstantsSkills_common.ZACC_SPINHIT, GamePlayer_AtLandingDone);
	}

	internal static LCUI_BOOL CommonSkill_CanUseAThrow(GamePlayer_ player)
	{
		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.a_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return GamePlayerStateCanThrow(player);
	}

	internal static LCUI_BOOL CommonSkill_CanUseBThrow(GamePlayer_ player)
	{
		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.b_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return GamePlayerStateCanThrow(player);
	}

	//* 在被举起的状态下，被动起跳 
	internal static void GamePlayer_BeLiftPassiveStartJump(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		player.other = null;
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_SJUMP);
	}

	internal static void GamePlayer_AtThrowLanding(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_StopXMotion(player);
		GamePlayer_StopYMotion(player);
		GamePlayer_StartStand(player);
	}

	//* 在抛飞结束时 
	internal static void GamePlayer_AtThrowUpFlyDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_StopXMotion(player);
		GameObject_AtTouch(widget, null);
		if(GamePlayer_SetLying(player) == 0)
		{
			GamePlayer_SetRestTimeOut(player, DefineConstantsSkills_common.BE_THROW_REST_TIMEOUT, GamePlayer_StartStand);
		}
	}

	//* 被抛后落地时，弹起 
	internal static void GamePlayer_LandingBounce(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_ReduceSpeed(player, 50);
		GlobalMembersGame_attack.Game_RecordAttack(player.other, DefineConstantsSkills_common.ATK_THROW, player, player.state);
		player.other = null;
		GameObject_AtLanding(widget, DefineConstantsSkills_common.ZSPEED_XF_HIT_FLY2, -DefineConstantsSkills_common.ZACC_XF_HIT_FLY2, GamePlayer_AtThrowUpFlyDone);
	}

	//* 处理游戏角色在被抛出时与其他角色的碰撞 
	internal static void GamePlayer_ProcThrowFlyTouch(LCUI_Widget_ self, LCUI_Widget_ other)
	{
		GamePlayer_ player;
		GamePlayer_ other_player;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(self);
		other_player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(other);
		if(player == null || other_player == null)
		{
			return;
		}

		// 判断自己的状态是否符合要求 
		if(player.state != (int)GamePlayerState.STATE_HIT_FLY && player.state != (int)GamePlayerState.STATE_HIT_FLY_FALL && player.state != (int)GamePlayerState.STATE_LYING && player.state != (int)GamePlayerState.STATE_TUMMY && player.state != (int)GamePlayerState.STATE_LYING_HIT && player.state != (int)GamePlayerState.STATE_TUMMY_HIT)
		{
			return;
		}
		// 如果有抛掷者记录 
		if(player.other)
		{
			// 如果触碰者是抛掷者，且抛掷者还处于抛掷动作 
			if(other_player == player.other && player.other.state == (int)GamePlayerState.STATE_THROW)
			{
					return;
			}
		}
		// 如果已经是受攻击者了，则退出，不重复记录攻击 
		if (GameObject_HaveVictim(self, other) != null)
		{
			return;
		}
		// 设置自己的攻击类型 
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_BUMPED);
		// 添加受害者记录 
		GameObject_DirectAddVictim(self, other);
		other_player.n_attack = 0;
	}

	//* 在抛投动作结束时 
	internal static void GamePlayer_AtThrowDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		double z;
		double z_speed;
		double z_acc;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		z = GameObject_GetZ(widget);
		z_speed = GameObject_GetZSpeed(widget);
		z_acc = GameObject_GetZAcc(widget);
		// 若还未落地，则维持该动作，直至落地时切换 
		if(z > 0 && z_acc < 0)
		{
			GameObject_AtLanding(widget, z_speed, z_acc, GamePlayer_AtThrowLanding);
		}
		else
		{
			GamePlayer_StopXMotion(player);
			GamePlayer_StopYMotion(player);
			GamePlayer_UnlockAction(player);
			GamePlayer_SetReady(player);
		}
	}

	internal static void GamePlayer_AtBeThrowDownDone(LCUI_Widget_ widget)
	{
		int ret = 0;
		GamePlayer_ player;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_TUMMY:
		case GamePlayerState.STATE_TUMMY_HIT:
			ret = GamePlayer_SetTummy(player);
			break;
		case GamePlayerState.STATE_LYING:
		case GamePlayerState.STATE_LYING_HIT:
			ret = GamePlayer_SetLying(player);
			break;
		default:
			break;
		}
		GamePlayer_LockAction(player);
		GamePlayer_StopXMotion(player);
		if(ret == 0)
		{
			GamePlayer_SetRestTimeOut(player, DefineConstantsSkills_common.BE_THROW_REST_TIMEOUT, GamePlayer_StartStand);
		}
	}

	internal static void GamePlayer_AtBeThrowDownLanding(LCUI_Widget_ widget)
	{
		GamePlayer_ player;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		if(player.state == (int)GamePlayerState.STATE_BE_LIFT_TUMMY)
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_TUMMY_HIT);
			GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_TUMMY_HIT, null);
		}
		else
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_LYING_HIT);
			GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_LYING_HIT, null);
		}
		GamePlayer_LockAction(player);
		GlobalMembersGame_attack.Game_RecordAttack(player.other, DefineConstantsSkills_common.ATK_THROW, player, player.state);
		player.other = null;
		GamePlayer_ReduceSpeed(player, 80);
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_XF_HIT_FLY2, -DefineConstantsSkills_common.ZACC_XF_HIT_FLY2, GamePlayer_AtBeThrowDownDone);
		// 撤销响应游戏对象之间的触碰 
		GameObject_AtTouch(player.object_, null);
	}

	//* 将举起的角色向下摔 
	internal static void CommonSkill_StartAThrow(GamePlayer_ player)
	{
		int state=0;
		double x_speed;

		if(GamePlayer_IsInLiftState(player) == null || player.state == (int)GamePlayerState.STATE_LIFT_SQUAT)
		{
			return;
		}
		if(player.state == (int)GamePlayerState.STATE_LIFT_RUN)
		{
			x_speed = GameObject_GetXSpeed(player.object_);
			GameObject_SetXAcc(player.object_, -x_speed *2.0);
		}
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_THROW);
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_THROW, GamePlayer_AtThrowDone);
		if(!player.other)
		{
			GamePlayer_LockAction(player);
			// 解除举起者与被举起者的关系 
			//player->other->other = NULL;
			player.other = null;
		}
		GamePlayer_BreakRest(player.other);
		GamePlayer_UnlockAction(player.other);
		switch((GamePlayerState)player.other.state)
		{
		case GamePlayerState.STATE_BE_LIFT_LYING:
		case GamePlayerState.STATE_BE_LIFT_LYING_HIT:
			state = (int)GamePlayerState.STATE_LYING;
			break;
		case GamePlayerState.STATE_BE_LIFT_TUMMY:
		case GamePlayerState.STATE_BE_LIFT_TUMMY_HIT:
			state = (int)GamePlayerState.STATE_TUMMY;
			break;
		case GamePlayerState.STATE_SQUAT:
		case GamePlayerState.STATE_BE_LIFT_SQUAT:
		case GamePlayerState.STATE_BE_LIFT_STANCE:
		case GamePlayerState.STATE_BE_LIFT_DEFENSE:
		case GamePlayerState.STATE_BE_LIFT_SOLID_DEFENSE:
		case GamePlayerState.STATE_BE_LIFT_A_ATTACK:
		case GamePlayerState.STATE_BE_LIFT_B_ATTACK:
		case GamePlayerState.STATE_BE_LIFT_MACH_A_ATTACK:
		case GamePlayerState.STATE_BE_LIFT_MACH_B_ATTACK:
			if (GamePlayer_IsLeftOriented(player) != null)
			{
				x_speed = -DefineConstantsSkills_common.XSPEED_RUN/2;
			}
			else
			{
				x_speed = DefineConstantsSkills_common.XSPEED_RUN/2;
			}
			x_speed += GameObject_GetXSpeed(player.object_)/2;
			GamePlayer_LockMotion(player.other);
			GameObject_SetXSpeed(player.other.object_, x_speed);
			GamePlayer_UnlockAction(player.other);
			GamePlayer_ChangeState(player.other,(int) GamePlayerState.STATE_BE_LIFT_SQUAT);
			GameObject_AtLanding(player.other.object_, DefineConstantsSkills_common.ZSPEED_JUMP, -DefineConstantsSkills_common.ZACC_JUMP, GamePlayer_AtLandingDone);
			GameObject_AtActionDone(player.other.object_, (int)ActionType.ACTION_SQUAT, GamePlayer_BeLiftPassiveStartJump);
				break;
			//C++ TO C# CONVERTER TODO TASK: C# does not allow fall-through from a non-empty 'case':
			default:
			GamePlayer_LockAction(player.other);
			GamePlayer_LockAction(player);
			player.other = null;
			return;
		}
	//     如果被举起的角色还处于 躺/趴着 的状态，
	//	 * 那就根据举起者的方向，将被举起者向相应方向扔。
	//	 
		if (GamePlayer_IsLeftOriented(player) != null)
		{
			x_speed = -DefineConstantsSkills_common.XSPEED_THROWDOWN_FLY;
			GamePlayer_SetRightOriented(player.other);
		}
		else
		{
			x_speed = DefineConstantsSkills_common.XSPEED_THROWDOWN_FLY;
			GamePlayer_SetLeftOriented(player.other);
		}
		// 改变状态 
		GamePlayer_ChangeState(player.other, state);
		// 加上投掷者的速度 
		x_speed += GameObject_GetXSpeed(player.object_)/2;
		// 锁定被投掷者的移动 
		GamePlayer_LockMotion(player.other);
		// 设置被投掷者的移动速度 
		GameObject_SetXSpeed(player.other.object_, x_speed);
		// 在落地时进行响应 
		GameObject_AtLanding(player.other.object_, -DefineConstantsSkills_common.ZSPEED_THROWDOWN_FLY, -DefineConstantsSkills_common.ZACC_THROWDOWN_FLY, GamePlayer_AtBeThrowDownLanding);
		// 清除攻击记录 
		GameObject_ClearAttack(player.other.object_);
		// 在被抛出者触碰到其它游戏角色时进行响应 
		GameObject_AtTouch(player.other.object_, GamePlayer_ProcThrowFlyTouch);
		// 锁定两者的动作 
		GamePlayer_LockAction(player.other);
		GamePlayer_LockAction(player);
		player.other = null;
	}

	//* 将举起的角色向前抛出 
	internal static void CommonSkill_StartBThrow(GamePlayer_ player)
	{
		double x_speed;
		if(GamePlayer_IsInLiftState(player) == null || player.state == (int)GamePlayerState.STATE_LIFT_SQUAT)
		{
			return;
		}
		// 如果在跑步，那就减点速度 
		if(player.state == (int)GamePlayerState.STATE_LIFT_RUN)
		{
			x_speed = GameObject_GetXSpeed(player.object_);
			GameObject_SetXAcc(player.object_, -x_speed *2.0);
		}
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_THROW);
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_THROW, GamePlayer_AtThrowDone);
		if(!player.other)
		{
			GamePlayer_LockAction(player);
			player.other = null;
		}
		// 打断休息时限倒计时，避免角色被抛出时，在空中站起 
		GamePlayer_BreakRest(player.other);
		GamePlayer_UnlockAction(player.other);
		switch((GamePlayerState)player.other.state)
		{
		case GamePlayerState.STATE_BE_LIFT_LYING:
		case GamePlayerState.STATE_BE_LIFT_LYING_HIT:
		case GamePlayerState.STATE_BE_LIFT_TUMMY:
		case GamePlayerState.STATE_BE_LIFT_TUMMY_HIT:
	//         如果被举起的角色还处于 躺/趴着 的状态，
	//			* 那就根据举起者的方向，将被举起者向相应方向扔。
	//			
			if (GamePlayer_IsLeftOriented(player) != null)
			{
				x_speed = -DefineConstantsSkills_common.XSPEED_THROWUP_FLY;
				GamePlayer_SetRightOriented(player.other);
			}
			else
			{
				x_speed = DefineConstantsSkills_common.XSPEED_THROWUP_FLY;
				GamePlayer_SetLeftOriented(player.other);
			}
			x_speed += GameObject_GetXSpeed(player.object_)/4;
			GamePlayer_LockMotion(player.other);
			GameObject_SetXSpeed(player.other.object_, x_speed);
			GamePlayer_ChangeState(player.other,(int) GamePlayerState.STATE_HIT_FLY_FALL);
			GameObject_AtLanding(player.other.object_, DefineConstantsSkills_common.ZSPEED_THROWUP_FLY, -DefineConstantsSkills_common.ZACC_THROWUP_FLY, GamePlayer_LandingBounce);
			// 清除攻击记录 
			GameObject_ClearAttack(player.other.object_);
			// 在被抛出者触碰到其它游戏角色时进行响应 
			GameObject_AtTouch(player.other.object_, GamePlayer_ProcThrowFlyTouch);
			break;
		case GamePlayerState.STATE_SQUAT:
		case GamePlayerState.STATE_BE_LIFT_SQUAT:
		case GamePlayerState.STATE_BE_LIFT_STANCE:
		case GamePlayerState.STATE_BE_LIFT_DEFENSE:
		case GamePlayerState.STATE_BE_LIFT_SOLID_DEFENSE:
		case GamePlayerState.STATE_BE_LIFT_A_ATTACK:
		case GamePlayerState.STATE_BE_LIFT_B_ATTACK:
		case GamePlayerState.STATE_BE_LIFT_MACH_A_ATTACK:
		case GamePlayerState.STATE_BE_LIFT_MACH_B_ATTACK:
			if (GamePlayer_IsLeftOriented(player) != null)
			{
				x_speed = -DefineConstantsSkills_common.XSPEED_RUN/2;
			}
			else
			{
				x_speed = DefineConstantsSkills_common.XSPEED_RUN/2;
			}
			x_speed += GameObject_GetXSpeed(player.object_)/2;
			GamePlayer_LockMotion(player.other);
			GameObject_SetXSpeed(player.other.object_, x_speed);
			GamePlayer_UnlockAction(player.other);
			GamePlayer_ChangeState(player.other,(int) GamePlayerState.STATE_BE_LIFT_SQUAT);
			GameObject_AtLanding(player.other.object_, DefineConstantsSkills_common.ZSPEED_JUMP, -DefineConstantsSkills_common.ZACC_JUMP, GamePlayer_AtLandingDone);
			GameObject_AtActionDone(player.other.object_, (int)ActionType.ACTION_SQUAT, GamePlayer_BeLiftPassiveStartJump);
				break;
			//C++ TO C# CONVERTER TODO TASK: C# does not allow fall-through from a non-empty 'case':
			default:
			break;
		}
		GamePlayer_LockAction(player.other);
		GamePlayer_LockAction(player);
		player.other = null;
	}

	internal static LCUI_BOOL CommonSkill_CanUseRide(GamePlayer_ player)
	{
		GamePlayer_ other_player;
		if(player.lock_motion)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if(!player.control.up_motion && !player.control.down_motion)
		{
			 return DefineConstantsSkills_common.FALSE;
		}
		if (GamePlayerStateCanNormalAttack(player) == null)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		other_player = GamePlayer_GetGroundPlayer(player);
		if (other_player == null)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (GamePlayer_CanLiftPlayer(player, other_player) == null)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		player.other = other_player;
		return DefineConstantsSkills_common.TRUE;
	}

	internal static void CommonSkill_StartRide(GamePlayer_ player)
	{
		int z_index;
		double x;
		double y;
		if(player.other)
		{
			player.other.other = player;
		}
		else
		{
			return;
		}
		GamePlayer_StopXMotion(player);
		GamePlayer_StopYMotion(player);
		x = GameObject_GetX(player.other.object_);
		y = GameObject_GetY(player.other.object_);
		GameObject_SetX(player.object_, x);
		GameObject_SetY(player.object_, y);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_RIDE);
		z_index = Widget_GetZIndex(player.other.object_);
		Widget_SetZIndex(player.object_, z_index+1);
	}

	internal static LCUI_BOOL CommonSkill_CanUseCatch(GamePlayer_ player)
	{
		double z1;
		double z2;
		GamePlayer_ other_player;

		if(player.lock_motion)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if(!player.control.left_motion && !player.control.right_motion)
		{
			 return DefineConstantsSkills_common.FALSE;
		}
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_READY:
		case GamePlayerState.STATE_STANCE:
		case GamePlayerState.STATE_WALK:
			other_player = GamePlayer_CatchGaspingPlayer(player);
			if (other_player != null)
			{
				z1 = GameObject_GetZ(player.object_);
				z2 = GameObject_GetZ(other_player.object_);
				// 两者高度差距不能太大 
				if(z1 <= z2-15 || z1 >= z2+15)
				{
					return DefineConstantsSkills_common.FALSE;
				}
				// 如对方被其它玩家抓住了 
				if(other_player.other && other_player.other != player && other_player.other.other == other_player)
				{
					return DefineConstantsSkills_common.FALSE;
				}
				// 记录擒获者和被擒者 
				player.other = other_player;
				other_player.other = player;
				return DefineConstantsSkills_common.TRUE;
			}
				break;
			default:
			break;
		}
		return DefineConstantsSkills_common.FALSE;
	}

	internal static void GamePlayer_AtCatchDone(GamePlayer_ player)
	{
		GamePlayer_UnlockAction(player);
		GamePlayer_UnlockMotion(player);
		GamePlayer_SetReady(player);
		if(player.other)
		{
			GamePlayer_UnlockAction(player.other);
			GamePlayer_SetRest(player.other);
		}
	}

	//* 在擒住状态下，对目标的状态进行调整 
	public static void CommonSkill_AdjustTargetAtBeCatch(GamePlayer_ self)
	{
		GamePlayer_ target_player;

		target_player = self.other;
		if (target_player == null)
		{
			return;
		}
		GamePlayer_UnlockAction(target_player);
		GamePlayer_StopXMotion(target_player);
		GamePlayer_StopYMotion(target_player);
		GamePlayer_ChangeState(target_player,(int) GamePlayerState.STATE_BE_CATCH);
		GamePlayer_LockAction(target_player);
		CommonSkill_SetPositionAtCatch(self, target_player);
		target_player.other = self;
	}

	//* 设置自己在擒获住对方时对方的位置 
	public static void CommonSkill_SetPositionAtCatch(GamePlayer_ self, GamePlayer_ other)
	{
		double x;
		double y;

		if(!self.other)
		{
			return;
		}

		x = GameObject_GetX(self.object_);
		y = GameObject_GetY(self.object_);
		GameObject_SetY(self.other.object_, y);

		if(self.control.left_motion && self.control.right_motion)
		{
			if (GamePlayer_IsLeftOriented(self.other) != null)
			{
				if(x < GameObject_GetX(self.other.object_))
				{
					return;
				}
				if (GamePlayer_IsLeftOriented(self.other) != null)
				{
					GamePlayer_ChangeState(self.other,(int) GamePlayerState.STATE_BACK_BE_CATCH);
					GameObject_SetX(self.other.object_, x-25);
				}
				else
				{
					GamePlayer_ChangeState(self.other,(int) GamePlayerState.STATE_BE_CATCH);
					GameObject_SetX(self.other.object_, x-30);
				}
				return;
			}
			if(x > GameObject_GetX(self.other.object_))
			{
				return;
			}
			if (GamePlayer_IsLeftOriented(self.other) != null)
			{
				GamePlayer_ChangeState(self.other,(int) GamePlayerState.STATE_BE_CATCH);
				GameObject_SetX(self.other.object_, x+30);
			}
			else
			{
				GamePlayer_ChangeState(self.other,(int) GamePlayerState.STATE_BACK_BE_CATCH);
				GameObject_SetX(self.other.object_, x+25);
			}
			return;
		}

		if(self.control.left_motion || GamePlayer_IsLeftOriented(self) != null)
		{
			if (GamePlayer_IsLeftOriented(self.other) != null)
			{
				GamePlayer_ChangeState(self.other,(int) GamePlayerState.STATE_BACK_BE_CATCH);
				GameObject_SetX(self.other.object_, x-25);
			}
			else
			{
				GamePlayer_ChangeState(self.other,(int) GamePlayerState.STATE_BE_CATCH);
				GameObject_SetX(self.other.object_, x-30);
			}
			return;
		}

		if(self.control.right_motion || GamePlayer_IsLeftOriented(self) == null)
		{
			if (GamePlayer_IsLeftOriented(self.other) != null)
			{
				GamePlayer_ChangeState(self.other,(int) GamePlayerState.STATE_BE_CATCH);
				GameObject_SetX(self.other.object_, x+30);
			}
			else
			{
				GamePlayer_ChangeState(self.other,(int) GamePlayerState.STATE_BACK_BE_CATCH);
				GameObject_SetX(self.other.object_, x+25);
			}
		}
	}

	internal static void CommonSkill_StartCatch(GamePlayer_ player)
	{
		if(!player.other)
		{
			return;
		}
		GamePlayer_UnlockAction(player);
		GamePlayer_UnlockAction(player.other);
		GamePlayer_StopXMotion(player);
		GamePlayer_StopYMotion(player);
		CommonSkill_SetPositionAtCatch(player, player.other);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_CATCH);
		GamePlayer_LockAction(player);
		GamePlayer_LockAction(player.other);
		GamePlayer_LockMotion(player);
		GamePlayer_LockMotion(player.other);
		GamePlayer_SetActionTimeOut(player, 2000, GamePlayer_AtCatchDone);
	}

	internal static LCUI_BOOL CommonSkill_CanUseRideAAttack(GamePlayer_ player)
	{
		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.a_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if(player.state != (int)GamePlayerState.STATE_RIDE)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if(!player.other)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if(player.other.other != player)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if(player.other.state != (int)GamePlayerState.STATE_LYING && player.other.state != (int)GamePlayerState.STATE_LYING_HIT && player.other.state != (int)GamePlayerState.STATE_TUMMY && player.other.state != (int)GamePlayerState.STATE_TUMMY_HIT)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return DefineConstantsSkills_common.TRUE;
	}

	internal static LCUI_BOOL CommonSkill_CanUseRideBAttack(GamePlayer_ player)
	{
		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.b_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if(player.state != (int)GamePlayerState.STATE_RIDE)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if(!player.other)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if(player.other.other != player)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if(player.other.state != (int)GamePlayerState.STATE_LYING && player.other.state != (int)GamePlayerState.STATE_LYING_HIT && player.other.state != (int)GamePlayerState.STATE_TUMMY && player.other.state != (int)GamePlayerState.STATE_TUMMY_HIT)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return DefineConstantsSkills_common.TRUE;
	}

	internal static void GamePlayer_AtRideAttackDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_UnlockAction(player);
		// 如果还骑在对方身上 
		if(player.other)
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_RIDE);
		}
	}

	internal static void CommonSkill_StartRideAAttack(GamePlayer_ player)
	{
		if(!player.other)
		{
			return;
		}
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_RIDE_ATTACK);
		GamePlayer_LockAction(player);
		GamePlayer_SetHit(player.other);
		GlobalMembersGame_attack.Game_RecordAttack(player, DefineConstantsSkills_common.ATK_RIDE_A_ATTACK, player.other, player.other.state);
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_RIDE_ATTACK, GamePlayer_AtRideAttackDone);
	}

	internal static void GamePlayer_AtRideJumpDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		if(!player.other)
		{
			GamePlayer_StartStand(player);
			return;
		}
		switch((GamePlayerState)player.other.state)
		{
		case GamePlayerState.STATE_TUMMY:
		case GamePlayerState.STATE_TUMMY_HIT:
		case GamePlayerState.STATE_LYING:
		case GamePlayerState.STATE_LYING_HIT:
				GlobalMembersGame_attack.Game_RecordAttack(player, DefineConstantsSkills_common.ATK_RIDE_B_ATTACK, player.other, player.other.state);
			CommonSkill_StartRideAAttack(player);
			break;
		default:
			player.other = null;
			GamePlayer_StartStand(player);
			break;
		}
	}

	internal static void CommonSkill_StartRideBAttack(GamePlayer_ player)
	{
		if(!player.other)
		{
			return;
		}
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_RIDE_JUMP);
		GamePlayer_LockAction(player);
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_JUMP, -DefineConstantsSkills_common.ZACC_JUMP, GamePlayer_AtRideJumpDone);
	}

	internal static LCUI_BOOL CommonSkill_CanUseBigElbow(GamePlayer_ player)
	{
		double speed;
		if (player.control.a_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_JUMP:
		case GamePlayerState.STATE_JSQUAT:
			speed = GameObject_GetZSpeed(player.object_);
			if(speed < 0)
			{
				return DefineConstantsSkills_common.TRUE;
			}
				break;
			default:
			break;
		}
		return DefineConstantsSkills_common.FALSE;
	}

	internal static LCUI_BOOL CommonSkill_CanUseGuillotine(GamePlayer_ player)
	{
		double speed;
		if (player.control.b_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_JUMP:
		case GamePlayerState.STATE_JSQUAT:
			speed = GameObject_GetZSpeed(player.object_);
			if(speed < 0)
			{
				return DefineConstantsSkills_common.TRUE;
			}
				break;
			default:
			break;
		}
		return DefineConstantsSkills_common.FALSE;
	}

	internal static void GamePlayer_AtBigElbowStep2(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GameObject_AtZeroZSpeed(widget, null);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_SQUAT);
		// 撤销再 下蹲 动作结束时的响应 
		GameObject_AtActionDone(widget, (int)ActionType.ACTION_SQUAT, null);
		GamePlayer_LockAction(player);
	}

	internal static void GamePlayer_AtBigElbowStep1(LCUI_Widget_ widget)
	{
		GameObject_SetXSpeed(widget, 0);
		GameObject_AtLanding(widget, DefineConstantsSkills_common.ZSPEED_BOUNCE, -DefineConstantsSkills_common.ZACC_BOUNCE, GamePlayer_AtAttackDone);
		GameObject_AtZeroZSpeed(widget, GamePlayer_AtBigElbowStep2);
	}

	internal static void CommonSkill_StartBigElbow(GamePlayer_ player)
	{
		double z_speed;
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BIG_ELBOW);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_BIG_ELBOW);
		GameObject_ClearAttack(player.object_);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		z_speed = GameObject_GetZSpeed(player.object_);
		GameObject_AtLanding(player.object_, z_speed, -DefineConstantsSkills_common.ZACC_JUMP, GamePlayer_AtBigElbowStep1);
	}

	internal static void CommonSkill_StartGuillotine(GamePlayer_ player)
	{
		double z_speed;
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_GUILLOTINE);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_GUILLOTINE);
		GameObject_ClearAttack(player.object_);
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		z_speed = GameObject_GetZSpeed(player.object_);
		GameObject_AtLanding(player.object_, z_speed, -DefineConstantsSkills_common.ZACC_JUMP, GamePlayer_AtBigElbowStep1);
	}

	internal static LCUI_BOOL CommonSkill_CanUseJump(GamePlayer_ player)
	{
		if (!player.control.jump)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		player.control.jump = DefineConstantsSkills_common.FALSE;
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_WALK:
		case GamePlayerState.STATE_STANCE:
				return DefineConstantsSkills_common.TRUE;
		case GamePlayerState.STATE_READY:
			if(player.lock_action)
			{
				return DefineConstantsSkills_common.FALSE;
			}
				break;
			case GamePlayerState.STATE_BE_LIFT_SQUAT:
		case GamePlayerState.STATE_BE_LIFT_STANCE:
		case GamePlayerState.STATE_LIFT_STANCE:
		case GamePlayerState.STATE_LIFT_WALK:
		case GamePlayerState.STATE_LIFT_RUN:
		case GamePlayerState.STATE_LEFTRUN:
		case GamePlayerState.STATE_RIGHTRUN:
		case GamePlayerState.STATE_AS_ATTACK:
		case GamePlayerState.STATE_BS_ATTACK:
			return DefineConstantsSkills_common.TRUE;
		default:
			break;
		}
		return DefineConstantsSkills_common.FALSE;
	}

	internal static void GamePlayer_PorcJumpTouch(LCUI_Widget_ self, LCUI_Widget_ other)
	{
		int state;
		double x;
		double y;
		GamePlayer_ player;
		GamePlayer_ other_player;
		RangeBox_ head_range = new RangeBox_();
		RangeBox_ foot_range = new RangeBox_();

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(self);
		if(player.state != (int)GamePlayerState.STATE_JUMP && player.state != (int)GamePlayerState.STATE_SJUMP)
		{
			GameObject_AtTouch(self, null);
			return;
		}
		// 若自己不处于下落状态 
		if(GameObject_GetZSpeed(self) > -10)
		{
			return;
		}
		GameObject_GetHitRange(other,out head_range);
		GameObject_GetHitRange(self,out foot_range);
		// 计算对方的头部范围 
		head_range.z = head_range.z_width - 5;
		head_range.z_width = 5;
		head_range.x += 5;
		head_range.x_width -= 10;
		// 计算自己的脚部范围 
		foot_range.z_width = 5;
		foot_range.x += 5;
		foot_range.x_width -= 10;
		// 若不相交 
		if (RangeBox_IsIntersect(foot_range, head_range) == null)
		{
			return;
		}
		other_player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(other);
		switch((GamePlayerState)other_player.state)
		{
		case GamePlayerState.STATE_READY:
		case GamePlayerState.STATE_STANCE:
			state = (int)GamePlayerState.STATE_LIFT_STANCE;
			break;
		case GamePlayerState.STATE_WALK:
			state = (int)GamePlayerState.STATE_LIFT_WALK;
			break;
		case GamePlayerState.STATE_LEFTRUN:
		case GamePlayerState.STATE_RIGHTRUN:
			state = (int)GamePlayerState.STATE_LIFT_RUN;
			break;
		default:
			// 对方的状态不符合要求则退出 
			 return;
		}
		player.other = other_player;
		other_player.other = player;
		x = GameObject_GetX(other);
		y = GameObject_GetY(other);
		GameObject_SetX(self, x);
		GameObject_SetY(self, y);
		GamePlayer_ChangeState(other_player, state);
		GamePlayer_StopXMotion(player);
		GameObject_SetZSpeed(self, 0);
		GameObject_SetZAcc(self, 0);
		GameObject_SetZ(self, DefineConstantsSkills_common.LIFT_HEIGHT);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BE_LIFT_SQUAT);
		GameObject_AtActionDone(self, (int)ActionType.ACTION_SQUAT, GamePlayer_SetBeLiftStance);
		// 在举起者的位置变化时更新被举起者的位置 
		GameObject_AtMove(other, GamePlayer_UpdateLiftPosition);
	}

	//* 在起跳动作结束时 
	internal static void GamePlayer_AtSquatActionDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_JUMP);
		// 在跳跃过程中检测是否有碰撞 
		GameObject_AtTouch(widget, GamePlayer_PorcJumpTouch);
	}

	//* 在被举起的状态下，主动起跳 
	internal static void CommonSkill_StartActiveJumpOnBeLift(GamePlayer_ player)
	{
		if(player.other)
		{
			switch((GamePlayerState)player.other.state)
			{
			case GamePlayerState.STATE_LIFT_FALL:
			case GamePlayerState.STATE_LIFT_JUMP:
				GamePlayer_ChangeState(player.other, (int)GamePlayerState.STATE_JUMP);
				break;
			case GamePlayerState.STATE_LIFT_STANCE:
				GamePlayer_ChangeState(player.other,(int) GamePlayerState.STATE_STANCE);
				break;
			case GamePlayerState.STATE_LIFT_WALK:
				GamePlayer_ChangeState(player.other,(int) GamePlayerState.STATE_WALK);
				break;
			case GamePlayerState.STATE_LIFT_RUN:
				if (GamePlayer_IsLeftOriented(player.other) != null)
				{
					GamePlayer_ChangeState(player.other,(int) GamePlayerState.STATE_LEFTRUN);
				}
				else
				{
					GamePlayer_ChangeState(player.other,(int) GamePlayerState.STATE_RIGHTRUN);
				}
				break;
			default:
				break;
			}
			player.other.other = null;
			player.other = null;
		}
		GamePlayer_LockMotion(player);
		if(player.control.left_motion)
		{
			GameObject_SetXSpeed(player.object_, -DefineConstantsSkills_common.XSPEED_WALK);
		}
		else if(player.control.right_motion)
		{
			GameObject_SetXSpeed(player.object_, DefineConstantsSkills_common.XSPEED_WALK);
		}
		CommonSkill_StartNormalJump(player);
	}

	//* 举着，下落 
	internal static void GamePlayer_SetLiftFall(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		// 撤销响应 
		GameObject_AtZeroZSpeed(player.object_, null);
		if(player.other == null)
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_JUMP);
			return;
		}
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_LIFT_FALL);
	}

	//* 举着，着陆 
	internal static void GamePlayer_AtLiftLanding(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		if(player.state == (int)GamePlayerState.STATE_THROW)
		{
			GamePlayer_ReduceSpeed(player, 75);
		}
		else if(player.state == (int)GamePlayerState.STATE_LIFT_JUMP || player.state == (int)GamePlayerState.STATE_LIFT_FALL)
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_LIFT_STANCE);
		}
		GamePlayer_UnlockMotion(player);
	}

	//* 举着，起跳 
	internal static void CommonSkill_StartJumpOnLift(GamePlayer_ player)
	{
		GamePlayer_UnlockAction(player);
		GamePlayer_LockMotion(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_LIFT_JUMP);
		GameObject_AtZeroZSpeed(player.object_, GamePlayer_SetLiftFall);
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_JUMP, -DefineConstantsSkills_common.ZACC_JUMP, GamePlayer_AtLiftLanding);
	}

	//* 在冲刺后的起跳动作结束时 
	internal static void GamePlayer_AtSprintSquatDone(LCUI_Widget_ widget)
	{
		GamePlayer_ player;
		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_SJUMP);
		GameObject_AtTouch(widget, GamePlayer_PorcJumpTouch);
	}

	//* 冲刺+起跳 
	internal static void CommonSkill_StartJumpOnRun(GamePlayer_ player)
	{
		GamePlayer_UnlockAction(player);
		GameObject_SetXAcc(player.object_, 0);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_SSQUAT);
		GamePlayer_LockMotion(player);
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_SQUAT, GamePlayer_AtSprintSquatDone);
		GameObject_AtLanding(player.object_, DefineConstantsSkills_common.ZSPEED_JUMP, -DefineConstantsSkills_common.ZACC_JUMP, GamePlayer_AtLandingDone);
	}

	internal static void CommonSkill_StartJump(GamePlayer_ player)
	{
		switch((GamePlayerState)player.state)
		{
		case GamePlayerState.STATE_WALK:
		case GamePlayerState.STATE_STANCE:
		case GamePlayerState.STATE_READY:
			CommonSkill_StartNormalJump(player);
			break;
		case GamePlayerState.STATE_BE_LIFT_SQUAT:
		case GamePlayerState.STATE_BE_LIFT_STANCE:
			CommonSkill_StartActiveJumpOnBeLift(player);
			break;
		case GamePlayerState.STATE_LIFT_STANCE:
		case GamePlayerState.STATE_LIFT_WALK:
		case GamePlayerState.STATE_LIFT_RUN:
			player.control.run = DefineConstantsSkills_common.FALSE;
			CommonSkill_StartJumpOnLift(player);
			break;
		case GamePlayerState.STATE_LEFTRUN:
		case GamePlayerState.STATE_RIGHTRUN:
		case GamePlayerState.STATE_AS_ATTACK:
		case GamePlayerState.STATE_BS_ATTACK:
			player.control.run = DefineConstantsSkills_common.FALSE;
			CommonSkill_StartJumpOnRun(player);
			break;
		default:
			break;
		}
	}

	internal static LCUI_BOOL CommonSkill_CanUsePush(GamePlayer_ player)
	{
		if(player.state != (int)GamePlayerState.STATE_CATCH || !player.other)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (player.control.b_attack == 0)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return DefineConstantsSkills_common.TRUE;
	}

	internal static void GamePlayer_AtWeakWalkDone(GamePlayer_ player)
	{
		double speed;
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_F_ROLL);
		GamePlayer_LockAction(player);
		speed = GameObject_GetXSpeed(player.object_);
		GameObject_SetXAcc(player.object_, -speed *4);
		GamePlayer_SetActionTimeOut(player, DefineConstantsSkills_common.ROLL_TIMEOUT, GamePlayer_AtForwardRollTimeOut);
	}

	internal static void CommonSkill_StartBackPush(GamePlayer_ player)
	{
		GamePlayer_ other_player;

		other_player = player.other;
		GamePlayer_UnlockAction(player);
		GamePlayer_UnlockAction(player.other);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_CATCH_SKILL_BB);
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_CATCH_SKILL_BB, GamePlayer_AtAttackDone);
		GamePlayer_ChangeState(player.other,(int) GamePlayerState.STATE_WEAK_RUN);
		// 在 STATE_WEAK_RUN 状态持续一段时间后结束 
		GamePlayer_SetActionTimeOut(player.other, DefineConstantsSkills_common.WEAK_WALK_TIMEOUT, GamePlayer_AtWeakWalkDone);
		GamePlayer_LockAction(player);
		GamePlayer_LockAction(player.other);
		if (GamePlayer_IsLeftOriented(player.other) != null)
		{
			GameObject_SetXSpeed(player.other.object_, -DefineConstantsSkills_common.XSPEED_WEAK_WALK);
		}
		else
		{
			GameObject_SetXSpeed(player.other.object_, DefineConstantsSkills_common.XSPEED_WEAK_WALK);
		}
		GamePlayer_LockMotion(player.other);
		player.other = null;
		other_player.other = null;
	}

	//* 处理游戏角色在进行虚弱奔跑时与其他角色的碰撞 
	internal static void GamePlayer_ProcWeakWalkAttack(LCUI_Widget_ self, LCUI_Widget_ other)
	{
		double x1;
		double x2;
		GamePlayer_ player;
		GamePlayer_ other_player;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(self);
		other_player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(other);
		if(player == null || other_player == null)
		{
			return;
		}
		// 如果自己并不是处于 虚弱奔跑（带攻击） 的状态 
		if(player.state != (int)GamePlayerState.STATE_WEAK_RUN_ATTACK)
		{
			return;
		}
		x1 = GameObject_GetX(self);
		x2 = GameObject_GetX(other);
		// 如果自己面朝左边 
		if (GamePlayer_IsLeftOriented(player) != null)
		{
			// 若对方位置并不在自己左边，则不产生碰撞 
			if(x2 > x1-10)
			{
				return;
			}
		}
		// 反之，也一样 
		else if(x2 < x1+10)
		{
			return;
		}
		if (GamePlayer_IsLeftOriented(player) != null)
		{
			AttackEffect_RightShortHitFly(player);
		}
		else
		{
			AttackEffect_LeftShortHitFly(player);
		}
		// 如果对方是背对着自己，且可以应用攻击效果，则对方会被推走 
		if(GamePlayer_IsLeftOriented(player) == GamePlayer_IsLeftOriented(other_player) && GamePlayer_CanUseAttackEffect(other_player) != null)
		{
			AttackEffect_BePushed(other_player);
		}
		else
		{
			// 根据自己面向的方向，判定短距离击飞的方向 
			if (GamePlayer_IsLeftOriented(player) != null)
			{
				AttackEffect_LeftShortHitFly(other_player);
			}
			else
			{
				AttackEffect_RightShortHitFly(other_player);
			}
		}
		// 两个都受到攻击伤害 
		GlobalMembersGame_attack.Game_RecordAttack(other_player, DefineConstantsSkills_common.ATK_BUMPED2, player, player.state);
		GlobalMembersGame_attack.Game_RecordAttack(player, DefineConstantsSkills_common.ATK_BUMPED2, other_player, other_player.state);
		GameObject_AtTouch(player.object_, null);
		player.n_attack = 0;
		other_player.n_attack = 0;
	}

	internal static void CommonSkill_StartFrontPush(GamePlayer_ player)
	{
		GamePlayer_ other_player;

		other_player = player.other;
		GamePlayer_UnlockAction(player);
		GamePlayer_UnlockAction(other_player);
		if (GamePlayer_IsLeftOriented(player) != null)
		{
			GamePlayer_SetRightOriented(player);
		}
		else
		{
			GamePlayer_SetLeftOriented(player);
		}
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_CATCH_SKILL_FB);
		GameObject_AtActionDone(player.object_, (int)ActionType.ACTION_CATCH_SKILL_FB, GamePlayer_AtAttackDone);
		GamePlayer_ChangeState(player.other,(int) GamePlayerState.STATE_WEAK_RUN_ATTACK);
		// 在与其他对象触碰时进行响应 
		GameObject_AtTouch(other_player.object_, GamePlayer_ProcWeakWalkAttack);
		GamePlayer_SetActionTimeOut(player.other, DefineConstantsSkills_common.WEAK_WALK_TIMEOUT, GamePlayer_AtWeakWalkDone);
		GamePlayer_LockAction(player);
		GamePlayer_LockAction(other_player);
		if (GamePlayer_IsLeftOriented(player.other) != null)
		{
			GameObject_SetXSpeed(other_player.object_, -DefineConstantsSkills_common.XSPEED_WEAK_WALK);
		}
		else
		{
			GameObject_SetXSpeed(other_player.object_, DefineConstantsSkills_common.XSPEED_WEAK_WALK);
		}
		GamePlayer_LockMotion(other_player);
		player.other = null;
		other_player.other = null;
	}

	internal static void CommonSkill_StartPush(GamePlayer_ player)
	{
		// 根据方向，判断该使用何种技能 
		if (GamePlayer_IsLeftOriented(player) != null)
		{
			if (GamePlayer_IsLeftOriented(player.other) != null)
			{
				CommonSkill_StartBackPush(player);
			}
			else
			{
				CommonSkill_StartFrontPush(player);
			}
		}
		else
		{
			if (GamePlayer_IsLeftOriented(player.other) != null)
			{
				CommonSkill_StartFrontPush(player);
			}
			else
			{
				CommonSkill_StartBackPush(player);
			}
		}
	}

	internal static LCUI_BOOL CommonSkill_CanUseDefense(GamePlayer_ player)
	{
		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (!player.control.defense)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if (!GamePlayerStateCanNormalAttack(player) )
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return DefineConstantsSkills_common.TRUE;
	}

	internal static void CommonSkill_StartDefense(GamePlayer_ player)
	{
		GamePlayer_StopXMotion(player);
		GamePlayer_StopYMotion(player);
		GamePlayer_LockMotion(player);
		if (!GlobalMembersGame_skill.GamePlayer_HaveSkill(player, DefineConstantsSkills_common.SKILLNAME_SOLID_DEFENSE))
		{
			if(player.other && GamePlayer_IsInLiftState(player.other))
			{
				GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BE_LIFT_DEFENSE);
			}
			else
			{
				GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_DEFENSE);
			}
			return;
		}
		if(player.other && GamePlayer_IsInLiftState(player.other) )
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_BE_LIFT_SOLID_DEFENSE);
		}
		else
		{
			GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_SOLID_DEFENSE);
		}
	}

	internal static LCUI_BOOL CommonSkill_CanUseJumpSpinKick(GamePlayer_ player)
	{
		if(player.lock_action)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		if(player.state != (int)GamePlayerState.STATE_SJUMP && player.state != (int)GamePlayerState.STATE_SSQUAT)
		{
			 return DefineConstantsSkills_common.FALSE;
		}
		if(!player.control.down_motion)
		{
			return DefineConstantsSkills_common.FALSE;
		}
		return DefineConstantsSkills_common.TRUE;
	}

	internal static void CommonSkill_StartSpinKickDown(LCUI_Widget_ widget)
	{
		GamePlayer_ player;

		player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(widget);
		// 增加下落的速度 
		GameObject_SetZSpeed(player.object_, -DefineConstantsSkills_common.ZSPEED_JUMP *2.5);
		GameObject_SetZAcc(player.object_, 0);
		// 根据角色目前面向的方向，设定水平移动方向及速度 
		if (GamePlayer_IsLeftOriented(player) != null)
		{
			GameObject_SetXSpeed(player.object_, -(DefineConstantsSkills_common.XSPEED_RUN *5));
		}
		else
		{
			GameObject_SetXSpeed(player.object_, DefineConstantsSkills_common.XSPEED_RUN *5);
		}
		GameObject_AtZeroZSpeed(player.object_, null);
		GamePlayer_UnlockAction(player);
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_KICK);
		GamePlayer_LockAction(player);
	}

	internal static void CommonSkill_StartJumpSpinKick(GamePlayer_ player)
	{
		double z_speed;
		// 如果该游戏角色并没处于奔跑后的 跳跃 的状态下 
		if(player.state != (int)GamePlayerState.STATE_SJUMP && player.state != (int)GamePlayerState.STATE_SSQUAT)
		{
			return;
		}
		// 增加点在Z轴的移动速度，以增加高度 
		z_speed = GameObject_GetZSpeed(player.object_);
		z_speed += DefineConstantsSkills_common.ZSPEED_JUMP;
		GameObject_SetZSpeed(player.object_, z_speed);
		GameObject_SetZAcc(player.object_, -z_speed *3);
		GamePlayer_SetAttackTypeName(player, DefineConstantsSkills_common.ATK_JUMP_SPINKICK);
		GameObject_ClearAttack(player.object_);
		// 开始翻滚 
		GamePlayer_ChangeState(player, (int)GamePlayerState.STATE_SPINHIT);
		// 锁定动作和移动 
		GamePlayer_LockAction(player);
		GamePlayer_LockMotion(player);
		// 滚了一会后再开始出脚 
		GameObject_AtZeroZSpeed(player.object_, CommonSkill_StartSpinKickDown);
	}

	

	public enum SkillPriority_HorizMotion
	{
		SKILLPRIORITY_RIDE,
		SKILLPRIORITY_JUMP_SPINKICK
	};

	enum SkillPriority_VertiMotion
	{
		SKILLPRIORITY_CATCH
	};

	enum SkillPriority_Jump
	{
		SKILLPRIORITY_JUMP
	};

	enum SkillPriority_Defense
	{
		SKILLPRIORITY_DEFENSE
	};

	//* 注册A攻击 
	internal static void CommonSkill_RegisterAAttack()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_A_ATTACK, SkillPriority_AAttack.SKILLPRIORITY_A_ATTACK, CommonSkill_CanUseAAttack, CommonSkill_StartAAttack);
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_MACH_A_ATTACK, SkillPriority_AAttack.SKILLPRIORITY_MACH_A_ATTACK, CommonSkill_CanUseAAttack, CommonSkill_StartMachAAttack);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_A_ATTACK, AttackDamage_AAttack, AttackEffect_Normal);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_MACH_A_ATTACK, AttackDamage_MachAAttack, AttackEffect_Normal);
	}

	//* 注册B攻击 
	internal static void CommonSkill_RegisterBAttack()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_B_ATTACK, SkillPriority_BAttack.SKILLPRIORITY_B_ATTACK, CommonSkill_CanUseBAttack, CommonSkill_StartBAttack);
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_MACH_B_ATTACK, SkillPriority_BAttack.SKILLPRIORITY_MACH_B_ATTACK, CommonSkill_CanUseBAttack, CommonSkill_StartMachBAttack);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_B_ATTACK, AttackDamage_BAttack, AttackEffect_Normal);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_MACH_B_ATTACK, AttackDamage_MachBAttack, AttackEffect_Normal);
	}

	//* 注册跳跃A攻击 
	internal static void CommonSkill_RegisterJumpAAttack()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_JUMP_A_ATTACK, SkillPriority_AAttack.SKILLPRIORITY_JUMP_A_ATTACK, CommonSkill_CanUseJumpAAttack, CommonSkill_StartJumpAAttack);
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_JUMP_MACH_A_ATTACK, SkillPriority_AAttack.SKILLPRIORITY_JUMP_MACH_A_ATTACK, CommonSkill_CanUseJumpAAttack, CommonSkill_StartJumpMachAAttack);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_JUMP_A_ATTACK, AttackDamage_MachAAttack, AttackEffect_Normal2);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_JUMP_MACH_A_ATTACK, AttackDamage_MachAAttack, AttackEffect_Normal2);
	}

	//* 注册跳跃B攻击 
	internal static void CommonSkill_RegisterJumpBAttack()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_JUMP_B_ATTACK, SkillPriority_BAttack.SKILLPRIORITY_JUMP_B_ATTACK, CommonSkill_CanUseJumpBAttack, CommonSkill_StartJumpBAttack);
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_JUMP_MACH_B_ATTACK, SkillPriority_BAttack.SKILLPRIORITY_JUMP_MACH_B_ATTACK, CommonSkill_CanUseJumpBAttack, CommonSkill_StartJumpMachBAttack);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_JUMP_B_ATTACK, AttackDamage_BAttack, AttackEffect_Normal2);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_JUMP_MACH_B_ATTACK, AttackDamage_BAttack, AttackEffect_Normal2);
	}

	//* 注册冲刺跳跃A攻击 
	internal static void CommonSkill_RegisterSprintJumpAAttack()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_SPRINT_JUMP_A_ATTACK, SkillPriority_AAttack.SKILLPRIORITY_SPRINT_JUMP_A_ATTACK, CommonSkill_CanUseSprintJumpAAttack, CommonSkill_StartSprintJumpAAttack);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_SPRINT_JUMP_A_ATTACK, AttackDamage_SprintJumpAAttack, AttackEffect_ShortHitFly);
	}

	//* 注册冲刺跳跃B攻击 
	internal static void CommonSkill_RegisterSprintJumpBAttack()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_SPRINT_JUMP_B_ATTACK, SkillPriority_BAttack.SKILLPRIORITY_SPRINT_JUMP_B_ATTACK, CommonSkill_CanUseSprintJumpBAttack, CommonSkill_StartSprintJumpBAttack);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_SPRINT_JUMP_B_ATTACK, AttackDamage_SprintJumpBAttack, AttackEffect_ShortHitFly);
	}

	//* 注册 终结一击 技能 
	internal static void CommonSkill_RegisterFinalBlow()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_A_FINALBLOW, SkillPriority_AAttack.SKILLPRIORITY_A_FINALBLOW, CommonSkill_CanUseFinalBlow, CommonSkill_StartFinalBlow);
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_B_FINALBLOW, SkillPriority_BAttack.SKILLPRIORITY_B_FINALBLOW, CommonSkill_CanUseFinalBlow, CommonSkill_StartFinalBlow);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_FINALBLOW, AttackDamage_FinalBlow, AttackEffect_LongHitFly);
	}

	internal static void CommonSkill_RegisterSprintAAttack()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_SPRINT_A_ATTACK, SkillPriority_AAttack.SKILLPRIORITY_SPRINT_A_ATTACK, CommonSkill_CanUseASprintAttack, CommonSkill_StartSprintAAttack);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_SPRINT_A_ATTACK, AttackDamage_SprintAAttack, AttackEffect_BumpToFly);
	}

	internal static void CommonSkill_RegisterSprintBAttack()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_SPRINT_B_ATTACK, SkillPriority_BAttack.SKILLPRIORITY_SPRINT_B_ATTACK, CommonSkill_CanUseBSprintAttack, CommonSkill_StartSprintBAttack);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_SPRINT_B_ATTACK, AttackDamage_SprintBAttack, AttackEffect_BumpToFly);
	}

	internal static void CommonSkill_RegisterPush()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_PUSH, SkillPriority_BAttack.SKILLPRIORITY_PUSH, CommonSkill_CanUsePush, CommonSkill_StartPush);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_BUMPED2, AttackDamage_Bumped, null);
	}

	internal static void CommonSkill_RegisterMachStomp()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_MACH_STOMP, SkillPriority_AAttack.SKILLPRIORITY_MACH_STOMP, CommonSkill_CanAAttackGround, CommonSkill_StartMachStomp);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_MACH_STOMP, AttackDamage_MachStomp, AttackEffect_Normal2);
	}

	internal static void CommonSkill_RegisterJumpElbow()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_JUMP_ELBOW, SkillPriority_AAttack.SKILLPRIORITY_JUMP_ELBOW, CommonSkill_CanAAttackGround, CommonSkill_StartJumpElbow);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_JUMP_ELBOW, AttackDamage_JumpElbow, AttackEffect_Normal2);
	}

	internal static void CommonSkill_RegisterJumpTread()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_JUMP_TREAD, SkillPriority_BAttack.SKILLPRIORITY_JUMP_TREAD, CommonSkill_CanBAttackGround, CommonSkill_StartJumpTread);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_JUMP_TREAD, AttackDamage_JumpTread, AttackEffect_Normal2);
	}

	internal static void CommonSkill_RegisterLift()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_A_LIFT, SkillPriority_AAttack.SKILLPRIORITY_A_LIFT, CommonSkill_CanALift, CommonSkill_StartLift);
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_B_LIFT, SkillPriority_BAttack.SKILLPRIORITY_B_LIFT, CommonSkill_CanBLift, CommonSkill_StartLift);
	}

	//* 注册 爆裂腿技能 
	internal static void CommonSkill_RegisterBombKick()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_BOMBKICK, SkillPriority_BAttack.SKILLPRIORITY_BOMBKICK, CommonSkill_CanUseBombKick, CommonSkill_StartBombKick);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_BOMBKICK, AttackDamage_BombKick, AttackEffect_LongHitFly);
	}

	//* 注册 自旋击技能 
	internal static void CommonSkill_RegisterSpinHit()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_SPINHIT, SkillPriority_AAttack.SKILLPRIORITY_SPINHIT, CommonSkill_CanUseSpinHit, CommonSkill_StartSpinHit);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_SPINHIT, AttackDamage_SpinHit, AttackEffect_LongHitFly);
	}

	//* 注册 二段自旋击技能 
	internal static void CommonSkill_RegisterSpinHit2()
	{
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_SPINHIT_2, AttackDamage_SpinHit, AttackEffect_LongHitFly);
	}

	internal static void CommonSkill_RegisterThrow()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_A_THROW, SkillPriority_AAttack.SKILLPRIORITY_A_THROW, CommonSkill_CanUseAThrow, CommonSkill_StartAThrow);
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_B_THROW, SkillPriority_BAttack.SKILLPRIORITY_B_THROW, CommonSkill_CanUseBThrow, CommonSkill_StartBThrow);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_THROW, AttackDamage_Throw, null);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_BUMPED, AttackDamage_Bumped, AttackEffect_TouchHitFly);
	}

	internal static void CommonSkill_RegisterRide()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_RIDE, (int)SkillPriority_HorizMotion.SKILLPRIORITY_RIDE, CommonSkill_CanUseRide, CommonSkill_StartRide);
	}

	internal static void CommonSkill_RegisterRideAttack()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_RIDE_A_ATTACK, SkillPriority_AAttack.SKILLPRIORITY_RIDE_A_ATTACK, CommonSkill_CanUseRideAAttack, CommonSkill_StartRideAAttack);
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_RIDE_B_ATTACK, SkillPriority_BAttack.SKILLPRIORITY_RIDE_B_ATTACK, CommonSkill_CanUseRideBAttack, CommonSkill_StartRideBAttack);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_RIDE_A_ATTACK, AttackDamage_RideAAttack, AttackEffect_Normal);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_RIDE_B_ATTACK, AttackDamage_RideBAttack, AttackEffect_Normal);
	}

	internal static void CommonSkill_RegisterCatch()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_CATCH, (int)SkillPriority_VertiMotion.SKILLPRIORITY_CATCH, CommonSkill_CanUseCatch, CommonSkill_StartCatch);
	}

	internal static void CommonSkill_RegisterBigElbow()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_BIG_ELBOW, SkillPriority_AAttack.SKILLPRIORITY_BIG_ELBOW, CommonSkill_CanUseBigElbow, CommonSkill_StartBigElbow);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_BIG_ELBOW, AttackDamage_BigElbow, AttackEffect_LongHitFly);
	}

	internal static void CommonSkill_RegisterGuillotine()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_GUILLOTINE, SkillPriority_BAttack.SKILLPRIORITY_GUILLOTINE, CommonSkill_CanUseGuillotine, CommonSkill_StartGuillotine);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_GUILLOTINE, AttackDamage_Guillotine, AttackEffect_LongHitFly);
	}

	internal static void CommonSkill_RegisterJump()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_JUMP, (int)SkillPriority_Jump.SKILLPRIORITY_JUMP, CommonSkill_CanUseJump, CommonSkill_StartJump);
	}

	internal static void CommonSkill_RegisterJumpSpinKick()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_JUMP_SPINKICK, (int)SkillPriority_HorizMotion.SKILLPRIORITY_JUMP_SPINKICK, CommonSkill_CanUseJumpSpinKick, CommonSkill_StartJumpSpinKick);
		GlobalMembersGame_attack.AttackLibrary_AddAttack(DefineConstantsSkills_common.ATK_JUMP_SPINKICK, AttackDamage_JumpSpinKick, AttackEffect_LongHitFly);
	}

	internal static void CommonSkill_RegisterDefense()
	{
		GlobalMembersGame_skill.SkillLibrary_AddSkill(DefineConstantsSkills_common.SKILLNAME_DEFENSE, (int)SkillPriority_Defense.SKILLPRIORITY_DEFENSE, CommonSkill_CanUseDefense, CommonSkill_StartDefense);
	}

	//* 注册通用技能 
	public static void CommonSkill_Register()
	{
		CommonSkill_RegisterAAttack();
		CommonSkill_RegisterBAttack();
		CommonSkill_RegisterJump();
		CommonSkill_RegisterDefense();
		CommonSkill_RegisterJumpAAttack();
		CommonSkill_RegisterJumpBAttack();
		CommonSkill_RegisterSprintAAttack();
		CommonSkill_RegisterSprintBAttack();
		CommonSkill_RegisterSprintJumpAAttack();
		CommonSkill_RegisterSprintJumpBAttack();
		CommonSkill_RegisterFinalBlow();
		CommonSkill_RegisterJumpElbow();
		CommonSkill_RegisterJumpTread();
		CommonSkill_RegisterLift();
		CommonSkill_RegisterThrow();
		CommonSkill_RegisterMachStomp();
		CommonSkill_RegisterBombKick();
		CommonSkill_RegisterSpinHit();
		CommonSkill_RegisterSpinHit2();
		CommonSkill_RegisterBigElbow();
		CommonSkill_RegisterGuillotine();
		CommonSkill_RegisterRide();
		CommonSkill_RegisterRideAttack();
		CommonSkill_RegisterCatch();
		CommonSkill_RegisterPush();
		CommonSkill_RegisterJumpSpinKick();
	}

	//* 在擒获范围内，获取可被直接擒获的目标 
	public static GamePlayer_ GetTargetInCatchRange(GamePlayer_ self)
	{
		RangeBox_ catch_range = new RangeBox_();
		GamePlayer_ other_player;
		LCUI_Widget_[] target_object = new LCUI_Widget_[3];
		int i;
		int j;
		int[] action = { (int)ActionType.ACTION_AS_ATTACK, (int)ActionType.ACTION_BS_ATTACK, (int)ActionType.ACTION_WEAK_RUN };

		// 自己必须处于READY、STANCE或WALK状态 
		if(self.state != (int)GamePlayerState.STATE_READY && self.state != (int)GamePlayerState.STATE_STANCE && self.state != (int)GamePlayerState.STATE_WALK)
		{
			 return null;
		}
		catch_range.x = 0;
		catch_range.y = 0;
		catch_range.z = 0;
		catch_range.x_width = DefineConstantsSkills_common.CATCH_RANGE_X_WIDTH;
		catch_range.y_width = DefineConstantsSkills_common.GLOBAL_Y_WIDTH;
		catch_range.z_width = 40;
		// 先找到分别处于3种动作的目标对象 
		for(i =0,j =0; i<3; ++i)
		{
			target_object[j] = GameObject_GetObjectInRange(self.object_, catch_range, DefineConstantsSkills_common.TRUE, action[i]);
			if(!target_object[j])
			{
				continue;
			}
			other_player = GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(target_object[j]);
			// 如果对方不是与自己面对面 
			if(GamePlayer_IsLeftOriented(self) == GamePlayer_IsLeftOriented(other_player))
			{
				target_object[j] = null;
				continue;
			}
			++j;
		}
		// 找到离自己最近的一个目标对象 
		for(i =0; i<j; ++i)
		{
			if (GamePlayer_IsLeftOriented(self) != null)
			{
				if(GameObject_GetX(target_object[0]) < GameObject_GetX(target_object[i]))
				{
					target_object[0] = target_object[i];
				}
				continue;
			}
			if(GameObject_GetX(target_object[0]) > GameObject_GetX(target_object[i]))
			{
				target_object[0] = target_object[i];
			}
		}
		// 若没有一个有效目标 
		if(!target_object[0])
		{
			return null;
		}
		return GlobalMembersGame_battle.GameBattle_GetPlayerByWidget(target_object[0]);
	}
}

public enum SkillPriority_AAttack
{
	SKILLPRIORITY_A_LIFT,
	SKILLPRIORITY_A_THROW,
	SKILLPRIORITY_MACH_STOMP,
	SKILLPRIORITY_JUMP_ELBOW,
	SKILLPRIORITY_A_FINALBLOW,
	SKILLPRIORITY_SPINHIT,
	SKILLPRIORITY_SPRINT_A_ATTACK,
	SKILLPRIORITY_SPRINT_JUMP_A_ATTACK,
	SKILLPRIORITY_BIG_ELBOW,
	SKILLPRIORITY_JUMP_MACH_A_ATTACK,
	SKILLPRIORITY_JUMP_A_ATTACK,
	SKILLPRIORITY_MACH_A_ATTACK,
	SKILLPRIORITY_A_ATTACK,
	SKILLPRIORITY_RIDE_A_ATTACK
};

public enum SkillPriority_BAttack
{
	SKILLPRIORITY_B_LIFT,
	SKILLPRIORITY_B_THROW,
	SKILLPRIORITY_JUMP_TREAD,
	SKILLPRIORITY_B_FINALBLOW,
	SKILLPRIORITY_BOMBKICK,
	SKILLPRIORITY_SPRINT_B_ATTACK,
	SKILLPRIORITY_SPRINT_JUMP_B_ATTACK,
	SKILLPRIORITY_GUILLOTINE,
	SKILLPRIORITY_JUMP_MACH_B_ATTACK,
	SKILLPRIORITY_JUMP_B_ATTACK,
	SKILLPRIORITY_PUSH,
	SKILLPRIORITY_MACH_B_ATTACK,
	SKILLPRIORITY_B_ATTACK,
	SKILLPRIORITY_RIDE_B_ATTACK
};